Commit 66d9c281 authored by J-P Nurmi's avatar J-P Nurmi Committed by The Qt Project
Browse files

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: default avatarTopi Reiniö <topi.reinio@digia.com>
Reviewed-by: default avatarCaroline Chao <caroline.chao@digia.com>
No related merge requests found
Showing with 5 additions and 5 deletions
......@@ -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
......
......@@ -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: [
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment