Liri Fluid API

TimePickerDialog QML Type

Dialog with a picker to select time. More...

Import Statement: import Fluid.Controls 1.1

Properties

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

orientation : enumeration

This property holds the picker orientation. The default value is automatically selected based on the device orientation.

Possible values:

ConstantDescription
TimePicker.LandscapeThe picker is landscape.
TimePicker.PortraitThe picker is portrait.

prefer24Hour : bool

This property determines the visibility of the AM/PM switch.


selectedTime : date

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()
      }
  }