Qt Reference Documentation

QML TumblerDialog Element

Provides a dialog for showing a Tumbler. More...

Inherits CommonDialog

This element was introduced in Qt Quick Components 1.0.

Properties

Detailed Description

A tumbler dialog is a dialog that shows a tumbler.

Creating a TumblerDialog

The code snippet below illustrates how to create a TumblerDialog.

 TumblerColumn {
     id: dayColumn
     label: "DAY"
     selectedIndex: 9
     items: daysList

     for (var day = 1; day <= 31; day++) {
         daysList.append({"value" : day});
     }
 }

 TumblerColumn {
     id: monthColumn
     label: "MONTH"
     selectedIndex: 4
     items: monthsList
 }

 ListModel {
     id: monthsList
     ListElement { value: "Jan" }
     ListElement { value: "Feb" }
     ListElement { value: "Mar" }
     ListElement { value: "Apr" }
     ListElement { value: "May" }
     ListElement { value: "Jun" }
     ListElement { value: "Jul" }
     ListElement { value: "Aug" }
     ListElement { value: "Sep" }
     ListElement { value: "Oct" }
     ListElement { value: "Nov" }
     ListElement { value: "Dec" }
 }

 TumblerColumn {
     id: yearColumn
     label: "YEAR"
     selectedIndex: 88
     items: yearsList

     for (var year = 1900; year <= 2011; year++) {
         yearsList.append({"value" : year});
     }
 }

 TumblerDialog {
     titleText: "Date of birth"
     columns: [ dayColumn, monthColumn, yearColumn ]
     onAccepted: callbackFunction()
 }

Property Documentation

acceptButtonText : string

The button text for the accept button.


columns : ListModel

Array of TumblerColumns for each column of the TumblerDialog.


rejectButtonText : string

The button text for the reject button.