Skip to main content

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