aboutsummaryrefslogtreecommitdiffstats
path: root/examples/quick/customitems/spinner/main.qml
blob: e6b674fc53552b03356480400d2ce338af6608fd (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
// Copyright (C) 2017 The Qt Company Ltd.
// SPDX-License-Identifier: LicenseRef-Qt-Commercial OR BSD-3-Clause

import QtQuick
import "content"

Rectangle {
    width: 240; height: 320

    Column {
        y: 20; x: 20; spacing: 20

        Spinner {
            id: spinner
            width: 200; height: 240
            focus: true
            model: 20
            itemHeight: 30
            delegate: Text { font.pixelSize: 25; text: index; height: 30 }
        }

        Text { text: "Current item index: " + spinner.currentIndex }
    }
}