TimePickerDialog QML Type
Dialog with a picker to select time. More...
Import Statement: | import Fluid.Controls 1.1 |
Properties
- orientation : enumeration
- prefer24Hour : bool
- selectedTime : date
- standardButtonsContainer : list<Object>
Detailed Description
A dialog that lets you selected time.
import QtQuick 2.10 import Fluid.Controls 1.0 as FluidControls Item { width: 600 height: 600 FluidControls.TimePickerDialog { onAccepted: { console.log(selectedDate); } standardButtons: DialogButtonBox.Ok | DialogButtonBox.Cancel } }
For more information you can read the Material Design guidelines.
Property Documentation
This property holds the picker orientation. The default value is automatically selected based on the device orientation.
Possible values:
Constant | Description |
---|---|
TimePicker.Landscape | The picker is landscape. |
TimePicker.Portrait | The picker is portrait. |
This property holds the time that has been selected by the user. The default value is the current time.
standardButtonsContainer : list<Object> |
This property allows you to place additional buttons alongside the standard buttons of the dialog, like in this example:
FluidControls.TimePickerDialog { id: timePickerDialog standardButtons: DialogButtonBox.Ok | DialogButtonBox.Cancel standardButtonsContainer: Button { anchors.verticalCenter: parent.verticalCenter text: qsTr("Now") flat: true onClicked: timePickerDialog.selectedTime = new Date() } }