Description
Offers controls to select time by hours and minutes. 12 and 24 hours systems supported. If OK is clicked, the selected hours and minutes are stored and can be accessed through the properties.
API properties
- int hours
- Currently selected hours.
- int minutes
- Currently selected minutes
- string minutesPadded
- Currently selected minutes with a 0 added at the beginning in case of 0 - 9 minutes
- string time
- Contains the current hours and minutes separated by a colon and followed by the content of the property ampm. This property is only valid once a time has been picked
- bool hr24
- Set to true if 24 hour system should be used. Default is false (12 hr am/pm)
- int minutesIncrement
- Sets the step width used to select minutes
Signals
See ModalFog signals.
Functions
-
Example
//a button labeled with the selected time
Button {
id: timeButton
text: timePicker.time
TimePicker {
id: timePicker
hr24: true
}
onClicked: {
timePicker.show()
}
}