diff options
| author | J-P Nurmi <jpnurmi@digia.com> | 2013-08-27 15:52:22 +0200 |
|---|---|---|
| committer | The Qt Project <gerrit-noreply@qt-project.org> | 2013-08-28 11:03:16 +0200 |
| commit | 66d9c281af9407d920f9cad7020f8314c9945a10 (patch) | |
| tree | d0496a7c5392919b02c9cb1f744a97953f8e99f7 /src | |
| parent | 6a2185228207dabb8e8c826ab8651db27ab3cde7 (diff) | |
Remove the duplicate Button::pressed property
Make it possible for Button to redefine BasicButton's "effective
pressed" state instead of overshadowing the pressed property.
Task-number: QTBUG-33124
Change-Id: I5b3570c51e1b2f8771f713e8f3f6982757d05770
Reviewed-by: Topi Reiniƶ <topi.reinio@digia.com>
Reviewed-by: Caroline Chao <caroline.chao@digia.com>
Diffstat (limited to 'src')
| -rw-r--r-- | src/controls/Button.qml | 5 | ||||
| -rw-r--r-- | src/controls/Private/BasicButton.qml | 5 |
2 files changed, 5 insertions, 5 deletions
diff --git a/src/controls/Button.qml b/src/controls/Button.qml index 028607722..f724e5af5 100644 --- a/src/controls/Button.qml +++ b/src/controls/Button.qml @@ -78,10 +78,7 @@ BasicButton { */ property Menu menu: null - /*! \qmlproperty bool BasicButton::pressed - - This property holds whether the button is being pressed. */ - readonly property bool pressed: __behavior.effectivePressed || menu && menu.__popupVisible + __effectivePressed: __behavior.effectivePressed || menu && menu.__popupVisible activeFocusOnTab: true diff --git a/src/controls/Private/BasicButton.qml b/src/controls/Private/BasicButton.qml index f07aea863..e48b1cda6 100644 --- a/src/controls/Private/BasicButton.qml +++ b/src/controls/Private/BasicButton.qml @@ -59,7 +59,7 @@ Control { /*! \qmlproperty bool BasicButton::pressed This property holds whether the button is being pressed. */ - readonly property alias pressed: behavior.effectivePressed + readonly property alias pressed: button.__effectivePressed /*! \qmlproperty bool BasicButton::hovered @@ -202,6 +202,9 @@ Control { /*! \internal */ property var __behavior: behavior + /*! \internal */ + property bool __effectivePressed: behavior.effectivePressed + SystemPalette { id: syspal } states: [ |
