aboutsummaryrefslogtreecommitdiffstats
path: root/examples/quick/accessibility/content/Checkbox.qml
diff options
context:
space:
mode:
authorJohanna Aijala <johanna.aijala@digia.com>2013-02-21 09:17:06 +0200
committerJohanna Aijala <johanna.aijala@digia.com>2013-02-21 09:21:34 +0200
commitd9e4b5c1820e62700756ede2ef5290baccc3c1b2 (patch)
treecc6975c1bd3ea86e4b7e5373560603e5165b7ff4 /examples/quick/accessibility/content/Checkbox.qml
parentf4d4689d3c09cb4eae30be892be426d4fa185ed4 (diff)
parentfb7ab18fa799032f37fd6f78ab34b76aff91ed6c (diff)
Merge branch 'stable' into release
Diffstat (limited to 'examples/quick/accessibility/content/Checkbox.qml')
-rw-r--r--examples/quick/accessibility/content/Checkbox.qml9
1 files changed, 6 insertions, 3 deletions
diff --git a/examples/quick/accessibility/content/Checkbox.qml b/examples/quick/accessibility/content/Checkbox.qml
index f16f66ebb2..7c20f55e90 100644
--- a/examples/quick/accessibility/content/Checkbox.qml
+++ b/examples/quick/accessibility/content/Checkbox.qml
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2012 Digia Plc and/or its subsidiary(-ies).
+** Copyright (C) 2013 Digia Plc and/or its subsidiary(-ies).
** Contact: http://www.qt-project.org/legal
**
** This file is part of the QtDeclarative module of the Qt Toolkit.
@@ -39,10 +39,8 @@
**
****************************************************************************/
-
import QtQuick 2.0
-
FocusScope {
id: checkbox
@@ -56,24 +54,29 @@ FocusScope {
Row {
spacing: 2
+
Rectangle {
width: 12
height: 12
border.width: checkbox.focus ? 2 : 1
border.color: "black"
+
Text {
id: checkboxText
text: checkbox.checked ? "x" : ""
anchors.centerIn: parent
}
}
+
Text {
text: checkbox.text
}
}
+
MouseArea {
anchors.fill: parent
onClicked: checkbox.checked = !checkbox.checked
}
+
Keys.onSpacePressed: checkbox.checked = !checkbox.checked
}