diff options
Diffstat (limited to 'src/controls/Button.qml')
-rw-r--r-- | src/controls/Button.qml | 24 |
1 files changed, 9 insertions, 15 deletions
diff --git a/src/controls/Button.qml b/src/controls/Button.qml index 1a9b198e..0a3cb131 100644 --- a/src/controls/Button.qml +++ b/src/controls/Button.qml @@ -72,20 +72,6 @@ BasicButton { */ property bool isDefault: false - /*! This property holds the text shown on the button. If the button has no - text, the \l text property will be an empty string. - - The default value is the empty string. - */ - property string text - - /*! This property holds the icon shown on the button. If the button has no - icon, the \l iconSource property will be an empty string. - - The default value is the empty string. - */ - property url iconSource - /*! Assign a \l Menu to this property to get a pull-down menu button. The default value is \c null. @@ -94,7 +80,7 @@ BasicButton { /*! \qmlproperty bool BasicButton::pressed - This property holds whether the button is pressed. */ + This property holds whether the button is being pressed. */ readonly property bool pressed: __behavior.effectivePressed || menu && menu.__popupVisible activeFocusOnTab: true @@ -115,6 +101,14 @@ BasicButton { value: button } + Binding { + target: button + property: "tooltip" + // We don't want a tooltip if it's the same as the button text + when: !!text && !(action && (!!action.tooltip || action.tooltip === text)) + value: "" + } + Connections { target: __behavior onEffectivePressedChanged: { |