Ubuntu Pastebin

Paste from mcphail at Tue, 21 Apr 2015 20:14:32 +0000

Download as text
 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
import QtQuick 2.0
import Ubuntu.Components 1.1
import Ubuntu.Components.Pickers 1.0

Item {
    id: root
    property double start: 0.0
    property int count: 11
    property double step: 1.0

    Picker {
        id: picker
        model: Array.apply(0, Array(root.count)).map(function (x,y) {
            return y * root.step + root.start
        })
        delegate: PickerDelegate {
            Label {
                text: modelData
                anchors.centerIn: parent
            }
        }
        circular: false
    }

}
Download as text