summaryrefslogtreecommitdiff
path: root/src/controls/Private
diff options
context:
space:
mode:
authorJ-P Nurmi <jpnurmi@theqtcompany.com>2014-10-16 14:49:32 +0200
committerJ-P Nurmi <jpnurmi@theqtcompany.com>2014-10-16 18:30:46 +0200
commite76f811b0d364b6afc32fa15c04889a92433a7c5 (patch)
tree500c23cb160f29df9fc2cd0c837b29d167fb2af7 /src/controls/Private
parent89e8039ad40afcb8dad4e1678369e5f9373f4704 (diff)
downloadqtquickcontrols-e76f811b0d364b6afc32fa15c04889a92433a7c5.tar.gz
BasicButton: handle mnemonics
Change-Id: Ie5cb9d5e4d5d48aedf211f4dff1f6a44cc1c9571 Reviewed-by: Liang Qi <liang.qi@digia.com>
Diffstat (limited to 'src/controls/Private')
-rw-r--r--src/controls/Private/BasicButton.qml4
1 files changed, 4 insertions, 0 deletions
diff --git a/src/controls/Private/BasicButton.qml b/src/controls/Private/BasicButton.qml
index f482ad72..f0c9c63e 100644
--- a/src/controls/Private/BasicButton.qml
+++ b/src/controls/Private/BasicButton.qml
@@ -152,6 +152,10 @@ Control {
id: ownAction
iconSource: !button.action || __iconOverriden ? button.iconSource : ""
iconName: !button.action || __iconOverriden ? button.iconName : ""
+
+ // let ownAction handle mnemonic if and only if the button does
+ // not already have an action assigned to avoid ambiguous shortcuts
+ text: button.action ? "" : button.text
}
Connections {