diff options
author | Friedemann Kleint <Friedemann.Kleint@digia.com> | 2014-06-20 11:05:11 +0200 |
---|---|---|
committer | Friedemann Kleint <Friedemann.Kleint@digia.com> | 2014-07-03 06:32:50 +0200 |
commit | 135e9d5a8286e5abd35e04213c232d73c2df15b5 (patch) | |
tree | 7a29ec8a5855085d824b2b91228d119e3c47049e /src/widgets/dialogs | |
parent | a4c4c12f0a7d00f238ede46f1fa8f89f61dce9a0 (diff) |
Implement QWidget::grabCursor(const QCursor&).
Implement using QGuiApplication::setOverrideCursor().
Task-number: QTBUG-39311
Change-Id: I83e289bfd5e911c31f08df9a4fc17fb8a0cf27f2
Reviewed-by: Shawn Rutledge <shawn.rutledge@digia.com>
Diffstat (limited to 'src/widgets/dialogs')
-rw-r--r-- | src/widgets/dialogs/qcolordialog.cpp | 11 |
1 files changed, 3 insertions, 8 deletions
diff --git a/src/widgets/dialogs/qcolordialog.cpp b/src/widgets/dialogs/qcolordialog.cpp index 714dcfa1f4..3f1773c88e 100644 --- a/src/widgets/dialogs/qcolordialog.cpp +++ b/src/widgets/dialogs/qcolordialog.cpp @@ -1553,12 +1553,10 @@ void QColorDialogPrivate::_q_pickScreenColor() q->installEventFilter(colorPickingEventFilter); // If user pushes Escape, the last color before picking will be restored. beforeScreenColorPicking = cs->currentColor(); - /*For some reason, q->grabMouse(Qt::CrossCursor) doesn't change - * the cursor, and therefore I have to change it manually. - */ - q->grabMouse(); #ifndef QT_NO_CURSOR - q->setCursor(Qt::CrossCursor); + q->grabMouse(Qt::CrossCursor); +#else + q->grabMouse(); #endif q->grabKeyboard(); /* With setMouseTracking(true) the desired color can be more precisedly picked up, @@ -1583,9 +1581,6 @@ void QColorDialogPrivate::releaseColorPicking() q->removeEventFilter(colorPickingEventFilter); q->releaseMouse(); q->releaseKeyboard(); -#ifndef QT_NO_CURSOR - q->setCursor(Qt::ArrowCursor); -#endif q->setMouseTracking(false); lblScreenColorInfo->setText(QLatin1String("\n")); addCusBt->setDisabled(false); |