Details
-
Bug
-
Resolution: Unresolved
-
P3: Somewhat important
-
None
-
5.2.1, 5.3.0 Beta1
-
None
Description
QQuickMouseArea overrides QQuickItem::isEnabled and setEnabled, and has its own "d->enabled" property. This means that setting enabled to false doesn't propagate the state to its children.
A simple fix would be to remove the overrides and rely on QQuickItem behavior, but I'm not sure i'm not missing some gotcha. Why does QQuickMouseArea reimplement them in the first place?
Test case:
import QtQuick 2.0 //Item { MouseArea { id: root width: 200 height: 200 enabled: false Item { id: child } Component.onCompleted: console.log(root.enabled, child.enabled) }
With the MouseArea as the root item the output is "false true", while with the Item as the root it is "false false"
Attachments
Issue Links
- relates to
-
QTBUG-29783 onPositionChanged signal keeps coming when MouseArea enabled is set to false in onPressed.
-
- Closed
-
-
QTBUG-32316 Inconsistent enabled behavior
-
- Reported
-
-
QTBUG-15798 Non-enabled MouseArea consumes events it usually pass on
-
- Closed
-
-
QTBUG-103788 Disabling parent of MouseArea in onPressed gets stuck with mouse but not through touch
-
- Closed
-
- resulted in
-
QTBUG-69696 Mousearea forwards events when disabled
-
- Reported
-
Gerrit Reviews
For Gerrit Dashboard: QTBUG-38364 | ||||||
---|---|---|---|---|---|---|
# | Subject | Branch | Project | Status | CR | V |
84892,2 | Document that MouseArea::enabled is not the same thing as Item::enabled. | dev | qt/qtdeclarative | Status: MERGED | +2 | 0 |