diff options
| author | Liang Qi <liang.qi@qt.io> | 2017-03-31 09:04:18 +0200 |
|---|---|---|
| committer | Liang Qi <liang.qi@qt.io> | 2017-03-31 09:04:18 +0200 |
| commit | 9f085b889524a80d4064d6ac01dbdc817bb31060 (patch) | |
| tree | a65a8871f44a0572e1459dd14759b2339f93de5e /src/controls/Private/BasicButton.qml | |
| parent | 9a56985c91d16d7c42ba86f4b0a70f85973e0618 (diff) | |
| parent | 8c37d58fa21fd3cf6897e2d7d4fe1f73c983d2f4 (diff) | |
Merge remote-tracking branch 'origin/5.9' into dev
Change-Id: Ia574913a1c2af6349db33966c172e96f6eb5f127
Diffstat (limited to 'src/controls/Private/BasicButton.qml')
| -rw-r--r-- | src/controls/Private/BasicButton.qml | 7 |
1 files changed, 6 insertions, 1 deletions
diff --git a/src/controls/Private/BasicButton.qml b/src/controls/Private/BasicButton.qml index 437ab4072..0206c72fd 100644 --- a/src/controls/Private/BasicButton.qml +++ b/src/controls/Private/BasicButton.qml @@ -122,6 +122,8 @@ Control { /*! The image label source as theme name. When an icon from the platform icon theme is found, this takes precedence over iconSource. + + \include icons.qdocinc iconName */ property string iconName: action ? action.iconName : "" @@ -167,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 @@ -178,6 +182,7 @@ Control { behavior.keyPressed = false; __action.trigger(button) behavior.toggle() + event.accepted = true; } } |
