summaryrefslogtreecommitdiff
path: root/share/qtcreator/welcomescreen/widgets/CheckBox.qml
blob: e61299b018b27089e024daedd54abc0a5eae7b04 (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
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
import QtQuick 1.0
import "../components/custom" as Custom

Custom.CheckBox{
    id:checkbox
    property string text
    property string hint
    height:20
    width: Math.max(110, backgroundItem.rowWidth)

    background: Item {
        property int rowWidth: row.width
        Row {
            id: row
            anchors.verticalCenter: parent.verticalCenter
            spacing: 4
            BorderImage {
                source: "qrc:welcome/images/lineedit.png";
                width: 16;
                height: 16;
                border.left: 4;
                border.right: 4;
                border.top: 4;
                border.bottom: 4
                Image {
                    source: "qrc:welcome/images/checked.png";
                    width: 10; height: 10
                    anchors.centerIn: parent
                    visible: checkbox.checked
                }
            }
            Text {
                text: checkbox.text
            }
        }
        Keys.onSpacePressed:checked = !checked

    }
}