diff options
Diffstat (limited to 'examples/quick/accessibility/content/Checkbox.qml')
-rw-r--r-- | examples/quick/accessibility/content/Checkbox.qml | 7 |
1 files changed, 5 insertions, 2 deletions
diff --git a/examples/quick/accessibility/content/Checkbox.qml b/examples/quick/accessibility/content/Checkbox.qml index c67d593f1d..7c20f55e90 100644 --- a/examples/quick/accessibility/content/Checkbox.qml +++ b/examples/quick/accessibility/content/Checkbox.qml @@ -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 } |