Skip to main content

QTime

Hierarchy

Index

Constructors

Properties

Methods

Constructors

constructor

+ new QTime(nativeOrHours?: NativeElement | number, m?: number, s: number, ms: number): QTime

Overrides Component.constructor

Parameters:

NameTypeDefault
nativeOrHours?NativeElement | number-
m?number-
snumber0
msnumber0

Returns: QTime

Properties

native

native: NativeElement | null

Inherited from Component.native

Methods

addMSecs

addMSecs(ms: number): QTime

Parameters:

NameType
msnumber

Returns: QTime


addSecs

addSecs(s: number): QTime

Parameters:

NameType
snumber

Returns: QTime


hour

hour(): number

Returns: number


isNull

isNull(): boolean

Returns: boolean


isValid

isValid(): boolean

Returns: boolean


minute

minute(): number

Returns: number


msec

msec(): number

Returns: number


msecsSinceStartOfDay

msecsSinceStartOfDay(): number

Returns: number


msecsTo

msecsTo(t: QTime): number

Parameters:

NameType
tQTime

Returns: number


second

second(): number

Returns: number


secsTo

secsTo(t: QTime): number

Parameters:

NameType
tQTime

Returns: number


setHMS

setHMS(h: number, m: number, s: number, ms: number): boolean

Parameters:

NameTypeDefault
hnumber-
mnumber-
snumber-
msnumber0

Returns: boolean


toString

toString(format: string | DateFormat): string

Parameters:

NameType
formatstring | DateFormat

Returns: string


Static currentTime

currentTime(): QTime

Returns: QTime


Static fromMSecsSinceStartOfDay

fromMSecsSinceStartOfDay(msecs: number): QTime

Parameters:

NameType
msecsnumber

Returns: QTime


Static fromQVariant

fromQVariant(variant: QVariant): QTime

Parameters:

NameType
variantQVariant

Returns: QTime


Static fromString

fromString(timeString: string, format: string | DateFormat): QTime

Parameters:

NameType
timeStringstring
formatstring | DateFormat

Returns: QTime


Static isValid

isValid(h: number, m: number, s: number, ms: number): boolean

Parameters:

NameTypeDefault
hnumber-
mnumber-
snumber-
msnumber0

Returns: boolean