diff options
| author | Shawn Rutledge <shawn.rutledge@qt.io> | 2020-01-16 13:45:15 +0100 |
|---|---|---|
| committer | Jan Arve Sæther <jan-arve.saether@qt.io> | 2020-01-31 11:13:26 +0100 |
| commit | 1c44804600ad3dbeb60d1f5209ce9cf937d30ab3 (patch) | |
| tree | cfa4c668cb527d89ae666ea1c2290a1cab4bc256 /src/quick/handlers/qquickpointerhandler_p_p.h | |
| parent | a6e661d25bf7ebeb8f4e58925aa9375f5ca10ef3 (diff) | |
Add PointerHandler.cursorShape property
Also, QQuickItemPrivate::setHasCursorInChild() was unable to check
the QQuickItemPrivate::hasCursor variable, because the function
argument hasCursor was shadowing that, even though the comment
"nope! sorry, I have a cursor myself" hints that the intention
was to check that. So this change exposed a problem there, and
we have to fix that too, in order to keep the tst_qquickwindow::cursor()
test passing.
[ChangeLog][Event Handlers] Pointer Handlers now have a cursorShape
property to set the cursor when the handler is active and the mouse is
hovering, and restore to the previous cursor when the mouse leaves.
Fixes: QTBUG-68073
Change-Id: Ib5c66bd59c4691c4210ee5465e1c95e7bdcf5ae1
Reviewed-by: Jan Arve Sæther <jan-arve.saether@qt.io>
Diffstat (limited to 'src/quick/handlers/qquickpointerhandler_p_p.h')
| -rw-r--r-- | src/quick/handlers/qquickpointerhandler_p_p.h | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/src/quick/handlers/qquickpointerhandler_p_p.h b/src/quick/handlers/qquickpointerhandler_p_p.h index 5727b1ef55..db053fb6b4 100644 --- a/src/quick/handlers/qquickpointerhandler_p_p.h +++ b/src/quick/handlers/qquickpointerhandler_p_p.h @@ -79,11 +79,13 @@ public: qreal m_margin = 0; qint16 dragThreshold = -1; // -1 means use the platform default uint8_t grabPermissions : 8; + Qt::CursorShape cursorShape : 6; bool enabled : 1; bool active : 1; bool targetExplicitlySet : 1; bool hadKeepMouseGrab : 1; // some handlers override target()->setKeepMouseGrab(); this remembers previous state bool hadKeepTouchGrab : 1; // some handlers override target()->setKeepTouchGrab(); this remembers previous state + bool cursorSet : 1; }; QT_END_NAMESPACE |
