aboutsummaryrefslogtreecommitdiffstats
path: root/src/quicktemplates2/qquickcontrol_p_p.h
diff options
context:
space:
mode:
authorJ-P Nurmi <jpnurmi@qt.io>2016-10-06 16:06:32 +0200
committerJ-P Nurmi <jpnurmi@qt.io>2016-10-17 09:51:41 +0000
commitbd5e078e5b908dc647b5395f9a772074ce206670 (patch)
tree1a9146ff01484fa43c554c7cdaefc35e483a5568 /src/quicktemplates2/qquickcontrol_p_p.h
parenta6e55c907e8b1f2928d7b642272e29522965ac6d (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/qquickcontrol_p_p.h')
-rw-r--r--src/quicktemplates2/qquickcontrol_p_p.h5
1 files changed, 5 insertions, 0 deletions
diff --git a/src/quicktemplates2/qquickcontrol_p_p.h b/src/quicktemplates2/qquickcontrol_p_p.h
index 26760510..cae1ae59 100644
--- a/src/quicktemplates2/qquickcontrol_p_p.h
+++ b/src/quicktemplates2/qquickcontrol_p_p.h
@@ -111,6 +111,10 @@ public:
static void updateLocaleRecur(QQuickItem *item, const QLocale &l);
static QLocale calcLocale(const QQuickItem *item);
+ void updateHoverEnabled(bool enabled, bool xplicit);
+ static void updateHoverEnabledRecur(QQuickItem *item, bool enabled);
+ static bool calcHoverEnabled(const QQuickItem *item);
+
void deleteDelegate(QObject *object);
struct ExtraData {
@@ -131,6 +135,7 @@ public:
bool hasLocale;
bool hovered;
bool wheelEnabled;
+ bool explicitHoverEnabled;
qreal padding;
qreal topPadding;
qreal leftPadding;