summaryrefslogtreecommitdiffstats
path: root/examples/gestures
diff options
context:
space:
mode:
Diffstat (limited to 'examples/gestures')
-rw-r--r--examples/gestures/imageviewer/imagewidget.cpp2
1 files changed, 2 insertions, 0 deletions
diff --git a/examples/gestures/imageviewer/imagewidget.cpp b/examples/gestures/imageviewer/imagewidget.cpp
index 8932e29..0db62bb 100644
--- a/examples/gestures/imageviewer/imagewidget.cpp
+++ b/examples/gestures/imageviewer/imagewidget.cpp
@@ -148,10 +148,12 @@ void ImageWidget::gestureEvent(QGestureEvent *event)
} else if (const QGesture *g = event->gesture(Qt::Pan)) {
if (zoomedIn) {
// usual panning
+#ifndef QT_NO_CURSOR
if (g->state() == Qt::GestureStarted)
setCursor(Qt::SizeAllCursor);
else
setCursor(Qt::ArrowCursor);
+#endif
const int dx = g->pos().x() - g->lastPos().x();
const int dy = g->pos().y() - g->lastPos().y();
horizontalOffset += dx;