diff options
Diffstat (limited to 'examples/quick/accessibility')
-rw-r--r-- | examples/quick/accessibility/accessibility.qml | 16 | ||||
-rw-r--r-- | examples/quick/accessibility/content/Button.qml | 5 |
2 files changed, 18 insertions, 3 deletions
diff --git a/examples/quick/accessibility/accessibility.qml b/examples/quick/accessibility/accessibility.qml index 2804d2abc8..e987561bb1 100644 --- a/examples/quick/accessibility/accessibility.qml +++ b/examples/quick/accessibility/accessibility.qml @@ -59,12 +59,13 @@ Rectangle { id: column spacing: 6 anchors.fill: parent + anchors.margins: 10 width: parent.width Row { spacing: 6 width: column.width - Button { width: 100; height: column.h + 20; text: "Send" } - Button { width: 100; height: column.h + 20; text: "Discard" } + Button { width: 100; height: column.h + 20; text: "Send"; onClicked : { status.text = "Send" } } + Button { width: 100; height: column.h + 20; text: "Discard"; onClicked : { status.text = "Discard" } } } Row { @@ -106,5 +107,16 @@ Rectangle { wrapMode: TextEdit.WordWrap } } + Text { + id : status + width: column.width + } + + Row { + spacing: 6 + width: column.width + Checkbox { checked: false } + Slider { value: 10 } + } } } diff --git a/examples/quick/accessibility/content/Button.qml b/examples/quick/accessibility/content/Button.qml index 2c203abe11..3d5086f741 100644 --- a/examples/quick/accessibility/content/Button.qml +++ b/examples/quick/accessibility/content/Button.qml @@ -49,6 +49,9 @@ Rectangle { Accessible.name: text Accessible.description: "This button does " + text Accessible.role: Accessible.Button + function accessiblePressAction() { + button.clicked() + } signal clicked @@ -74,7 +77,7 @@ Rectangle { id: mouseArea anchors.fill: parent onClicked: { - checked = !checked; + parent.clicked() } } } |