diff options
author | J-P Nurmi <jpnurmi@qt.io> | 2016-10-06 16:06:32 +0200 |
---|---|---|
committer | J-P Nurmi <jpnurmi@qt.io> | 2016-10-17 09:51:41 +0000 |
commit | bd5e078e5b908dc647b5395f9a772074ce206670 (patch) | |
tree | 1a9146ff01484fa43c554c7cdaefc35e483a5568 /src/quicktemplates2/qquicktextarea_p.h | |
parent | a6e55c907e8b1f2928d7b642272e29522965ac6d (diff) |
Make hoverEnabled propagate to children
Hover effects can be sometimes a bit disturbing. This change makes it
possible to conveniently disable hover effects for a tree of controls
in one go. For example, to disable hover effects for a page including
its header, footer, and all list items:
Page {
hoverEnabled: false
header: ...
footer: ...
ListView {
delegate: ...
}
}
[ChangeLog][Controls][Important Behavior Changes] Control::hoverEnabled
has been made to inherit to children, to make it possible to disable
hover effects for a tree of controls in one place.
Change-Id: Ia87144f2cc04957a32f89d3313816b91d97db635
Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org>
Reviewed-by: J-P Nurmi <jpnurmi@qt.io>
Reviewed-by: Mitch Curtis <mitch.curtis@qt.io>
Diffstat (limited to 'src/quicktemplates2/qquicktextarea_p.h')
-rw-r--r-- | src/quicktemplates2/qquicktextarea_p.h | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/src/quicktemplates2/qquicktextarea_p.h b/src/quicktemplates2/qquicktextarea_p.h index 20500ee690..35bddba00a 100644 --- a/src/quicktemplates2/qquicktextarea_p.h +++ b/src/quicktemplates2/qquicktextarea_p.h @@ -68,7 +68,7 @@ class Q_QUICKTEMPLATES2_PRIVATE_EXPORT QQuickTextArea : public QQuickTextEdit Q_PROPERTY(QString placeholderText READ placeholderText WRITE setPlaceholderText NOTIFY placeholderTextChanged FINAL) Q_PROPERTY(Qt::FocusReason focusReason READ focusReason WRITE setFocusReason NOTIFY focusReasonChanged FINAL) Q_PROPERTY(bool hovered READ isHovered NOTIFY hoveredChanged FINAL REVISION 1) - Q_PROPERTY(bool hoverEnabled READ isHoverEnabled WRITE setHoverEnabled NOTIFY hoverEnabledChanged FINAL REVISION 1) + Q_PROPERTY(bool hoverEnabled READ isHoverEnabled WRITE setHoverEnabled RESET resetHoverEnabled NOTIFY hoverEnabledChanged FINAL REVISION 1) public: explicit QQuickTextArea(QQuickItem *parent = nullptr); @@ -93,6 +93,7 @@ public: bool isHoverEnabled() const; void setHoverEnabled(bool enabled); + void resetHoverEnabled(); bool contains(const QPointF &point) const override; |