QFont

Hierarchy

Index

Constructors

Properties

Methods

Constructors

constructor

+ new QFont(): QFont

Overrides Component.constructor

Returns: QFont

+ new QFont(font: QFont): QFont

Overrides Component.constructor

Parameters:

NameType
fontQFont

Returns: QFont

+ new QFont(native: NativeElement): QFont

Overrides Component.constructor

Parameters:

NameType
nativeNativeElement

Returns: QFont

+ new QFont(family: string, pointSize?: number, weight?: QFontWeight, italic?: boolean): QFont

Overrides Component.constructor

Parameters:

NameType
familystring
pointSize?number
weight?QFontWeight
italic?boolean

Returns: QFont

Properties

native

• native: NativeElement | null

Inherited from Component.native

Methods

bold

â–¸ bold(): boolean

Returns: boolean


capitalization

â–¸ capitalization(): QFontCapitalization

Returns: QFontCapitalization


family

â–¸ family(): string

Returns: string


italic

â–¸ italic(): boolean

Returns: boolean


pixelSize

â–¸ pixelSize(): number

Returns: number


pointSize

â–¸ pointSize(): number

Returns: number


setBold

â–¸ setBold(enable: boolean): void

Parameters:

NameType
enableboolean

Returns: void


setCapitalization

â–¸ setCapitalization(caps: QFontCapitalization): void

Parameters:

NameType
capsQFontCapitalization

Returns: void


setFamily

â–¸ setFamily(family: string): void

Parameters:

NameType
familystring

Returns: void


setItalic

â–¸ setItalic(enable: boolean): void

Parameters:

NameType
enableboolean

Returns: void


setPixelSize

â–¸ setPixelSize(value: number): void

Parameters:

NameType
valuenumber

Returns: void


setPointSize

â–¸ setPointSize(value: number): void

Parameters:

NameType
valuenumber

Returns: void


setStretch

â–¸ setStretch(factor: QFontStretch): void

Parameters:

NameType
factorQFontStretch

Returns: void


setStyleName

â–¸ setStyleName(style: string): void

Parameters:

NameType
stylestring

Returns: void


setWeight

â–¸ setWeight(weight: QFontWeight): void

Parameters:

NameType
weightQFontWeight

Returns: void


stretch

â–¸ stretch(): QFontStretch

Returns: QFontStretch


toString

â–¸ toString(): string

Returns: string


weight

â–¸ weight(): QFontWeight

Returns: QFontWeight


Static fromQVariant

â–¸ fromQVariant(variant: QVariant): QFont

Parameters:

NameType
variantQVariant

Returns: QFont