diff options
author | Morten Johan Sørvig <morten.sorvig@qt.io> | 2017-05-12 15:02:12 +0200 |
---|---|---|
committer | Morten Johan Sørvig <morten.sorvig@qt.io> | 2017-12-15 16:18:24 +0000 |
commit | 91aa782f0197034e0755f131e63fcec5bbf1e956 (patch) | |
tree | 51dcde720f589d5134e33719d25f76d7984324ff /src/gui | |
parent | 60d99b6413600194a2d1f3dde8313b55bf3d12f0 (diff) |
QDrag: Allow setting cursor for IgnoreAction
This is especially useful on macOS where the default
ignore cursor is the pointer cursor.
Change-Id: I5e14814abd2d59a7f4c4cd1029829ebbed5b3017
Task-number: QTBUG-26724
Reviewed-by: Jake Petroules <jake.petroules@qt.io>
Diffstat (limited to 'src/gui')
-rw-r--r-- | src/gui/kernel/qdrag.cpp | 7 |
1 files changed, 3 insertions, 4 deletions
diff --git a/src/gui/kernel/qdrag.cpp b/src/gui/kernel/qdrag.cpp index 0aadac2c62..982c9e7659 100644 --- a/src/gui/kernel/qdrag.cpp +++ b/src/gui/kernel/qdrag.cpp @@ -319,14 +319,13 @@ Qt::DropAction QDrag::start(Qt::DropActions request) to override the default native cursors. To revert to using the native cursor for \a action pass in a null QPixmap as \a cursor. - The \a action can only be CopyAction, MoveAction or LinkAction. - All other values of DropAction are ignored. + Note: setting the drag cursor for IgnoreAction may not work on + all platforms. X11 and macOS has been tested to work. Windows + does not support it. */ void QDrag::setDragCursor(const QPixmap &cursor, Qt::DropAction action) { Q_D(QDrag); - if (action != Qt::CopyAction && action != Qt::MoveAction && action != Qt::LinkAction) - return; if (cursor.isNull()) d->customCursors.remove(action); else |