summaryrefslogtreecommitdiff
path: root/src/controls
diff options
context:
space:
mode:
authorPaul Olav Tvete <paul.tvete@qt.io>2017-03-02 10:22:22 +0100
committerPaul Olav Tvete <paul.tvete@qt.io>2017-03-02 10:23:17 +0100
commitba81daa6f58992f0724f0a43590fae3453d3948e (patch)
tree50ca39886f4a196708fcfdfad807dfaeb4d7fad5 /src/controls
parent98ed5ba985f04f342a11d6a8550f843fd053b39d (diff)
parent7b6f57086bbc64ad2f9be0c75a462120fc031e86 (diff)
downloadqtquickcontrols-ba81daa6f58992f0724f0a43590fae3453d3948e.tar.gz
Merge remote-tracking branch 'qt/5.8' into 5.9
Change-Id: Ia4337204f3b69d63eb50d1b918685b098c77b48d
Diffstat (limited to 'src/controls')
-rw-r--r--src/controls/Private/BasicButton.qml5
1 files changed, 4 insertions, 1 deletions
diff --git a/src/controls/Private/BasicButton.qml b/src/controls/Private/BasicButton.qml
index a9ca4c48..0206c72f 100644
--- a/src/controls/Private/BasicButton.qml
+++ b/src/controls/Private/BasicButton.qml
@@ -169,8 +169,10 @@ Control {
activeFocusOnTab: true
Keys.onPressed: {
- if (event.key === Qt.Key_Space && !event.isAutoRepeat && !behavior.pressed)
+ if (event.key === Qt.Key_Space && !event.isAutoRepeat && !behavior.pressed) {
behavior.keyPressed = true;
+ event.accepted = true;
+ }
}
onFocusChanged: if (!focus) behavior.keyPressed = false
@@ -180,6 +182,7 @@ Control {
behavior.keyPressed = false;
__action.trigger(button)
behavior.toggle()
+ event.accepted = true;
}
}