aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorDaiwei Li <daiweili@suitabletech.com>2013-08-24 22:23:10 -0700
committerThe Qt Project <gerrit-noreply@qt-project.org>2013-08-27 13:30:19 +0200
commitc345388df18b7b468c2438990b7bc17658b3ab11 (patch)
treee56449b827a122968b22c0bd7ec70e16ef6bcda3
parent6ba7d88df623df5bce85bfdae853fc49006e76f2 (diff)
Explicitly call setCursor in the QQuickMouseArea constructor
QQuickItemPrivate has a boolean hasCursor that is used by QQuickWindow to determine whether to use the cursor for an item. QQuickMouseArea has a default cursorShape of Qt.ArrowCursor that is ignored due to hasCursor not being set. Thus, call setCursor in the QQuickMouseArea constructor to sync the cursor state of the QQuickItem and the MouseArea. Task-number: QTBUG-33157 Change-Id: I56402564bd72bdc89d6ef8e5bc75bfd07c096202 Reviewed-by: Josh Faust <jfaust@suitabletech.com> Reviewed-by: Alan Alpert <aalpert@blackberry.com>
-rw-r--r--src/quick/items/qquickmousearea.cpp6
1 files changed, 6 insertions, 0 deletions
diff --git a/src/quick/items/qquickmousearea.cpp b/src/quick/items/qquickmousearea.cpp
index a8786585da..1970a03bee 100644
--- a/src/quick/items/qquickmousearea.cpp
+++ b/src/quick/items/qquickmousearea.cpp
@@ -547,6 +547,12 @@ QQuickMouseArea::QQuickMouseArea(QQuickItem *parent)
{
Q_D(QQuickMouseArea);
d->init();
+#ifndef QT_NO_CURSOR
+ // Explcitly call setCursor on QQuickItem since
+ // it internally keeps a boolean hasCursor that doesn't
+ // get set to true unless you call setCursor
+ setCursor(Qt::ArrowCursor);
+#endif
}
QQuickMouseArea::~QQuickMouseArea()