From 91aa782f0197034e0755f131e63fcec5bbf1e956 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Morten=20Johan=20S=C3=B8rvig?= Date: Fri, 12 May 2017 15:02:12 +0200 Subject: 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 --- src/gui/kernel/qdrag.cpp | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) (limited to 'src/gui') 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 -- cgit v1.2.3