diff options
author | Daiwei Li <daiweili@suitabletech.com> | 2013-08-24 22:23:10 -0700 |
---|---|---|
committer | The Qt Project <gerrit-noreply@qt-project.org> | 2013-08-27 13:30:19 +0200 |
commit | c345388df18b7b468c2438990b7bc17658b3ab11 (patch) | |
tree | e56449b827a122968b22c0bd7ec70e16ef6bcda3 /src/quick/items/qquickmousearea.cpp | |
parent | 6ba7d88df623df5bce85bfdae853fc49006e76f2 (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>
Diffstat (limited to 'src/quick/items/qquickmousearea.cpp')
-rw-r--r-- | src/quick/items/qquickmousearea.cpp | 6 |
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() |