MeeGo 1.2 Harmattan Developer Documentation Develop for the Nokia N9

QML TimePickerDialog Element

TimePickerDialog is a Dialog to select time More...

Inherits Dialog

This element was introduced in qt-components 4.7.

Properties

Detailed Description

Dialog that shows a time picker.

 TimePickerDialog {
     id: tDialog
     titleText: "Alarm Time"
     onAccepted: callbackFunction()
 }

 function launchDialog() {
     tDialog.open();
 }

 function launchDialogToTime(hour, minute) {
     tDialog.hour = hour;
     tDialog.minute = minute;
     tDialog.fields = DateTime.Hours | DateTime.Minutes;
     tDialog.open();
 }

 function callbackFunction() {
     result.text = tDialog.hour + ":" + tDialog.minute + ":" + tDialog.second
 }

See also Dialog.

Property Documentation

acceptButtonText : string

Optional, the button text for the accept button.


fields : enum

Property default is DateTime.All

Binary flag to set if the time picker should show hours, minutes, and/or seconds. Valid values are DateTime.Hours, DateTime.Minutes, DateTime.Seconds, DateTime.All. Can be combined with binary operator |, e.g. DateTime.Minutes | DateTime.Seconds


hour : int

Property default is 0

The displayed hour.


hourMode : enum

Property default is the system time mode

Sets if the time picker should show time in 24-hour clock or 12-hour clock format. Valid values are DateTime.TwentyFourHours, DateTime.TwelveHours


minute : int

Property default is 0

The displayed minute.


rejectButtonText : string

Optional, the button text for the reject button.


second : int

Property default is 0

The displayed second.


titleText : string

If not null, it will be used as the title text for the dialog. If further customization is needed, use property title instead.