summaryrefslogtreecommitdiffstats
path: root/examples/threads
diff options
context:
space:
mode:
Diffstat (limited to 'examples/threads')
-rw-r--r--examples/threads/mandelbrot/mandelbrotwidget.cpp2
-rw-r--r--examples/threads/mandelbrot/mandelbrotwidget.h2
2 files changed, 4 insertions, 0 deletions
diff --git a/examples/threads/mandelbrot/mandelbrotwidget.cpp b/examples/threads/mandelbrot/mandelbrotwidget.cpp
index c1ec029548..3a10a7a726 100644
--- a/examples/threads/mandelbrot/mandelbrotwidget.cpp
+++ b/examples/threads/mandelbrot/mandelbrotwidget.cpp
@@ -162,6 +162,7 @@ void MandelbrotWidget::keyPressEvent(QKeyEvent *event)
}
//! [11]
+#ifndef QT_NO_WHEELEVENT
//! [12]
void MandelbrotWidget::wheelEvent(QWheelEvent *event)
{
@@ -170,6 +171,7 @@ void MandelbrotWidget::wheelEvent(QWheelEvent *event)
zoom(pow(ZoomInFactor, numSteps));
}
//! [12]
+#endif
//! [13]
void MandelbrotWidget::mousePressEvent(QMouseEvent *event)
diff --git a/examples/threads/mandelbrot/mandelbrotwidget.h b/examples/threads/mandelbrot/mandelbrotwidget.h
index ea5fdc53c1..238a2bdca1 100644
--- a/examples/threads/mandelbrot/mandelbrotwidget.h
+++ b/examples/threads/mandelbrot/mandelbrotwidget.h
@@ -58,7 +58,9 @@ protected:
void paintEvent(QPaintEvent *event);
void resizeEvent(QResizeEvent *event);
void keyPressEvent(QKeyEvent *event);
+#ifndef QT_NO_WHEELEVENT
void wheelEvent(QWheelEvent *event);
+#endif
void mousePressEvent(QMouseEvent *event);
void mouseMoveEvent(QMouseEvent *event);
void mouseReleaseEvent(QMouseEvent *event);