summaryrefslogtreecommitdiffstats
path: root/examples/widgets/painting/affine
diff options
context:
space:
mode:
Diffstat (limited to 'examples/widgets/painting/affine')
-rw-r--r--examples/widgets/painting/affine/affine.pro2
-rw-r--r--examples/widgets/painting/affine/xform.cpp2
-rw-r--r--examples/widgets/painting/affine/xform.h2
3 files changed, 5 insertions, 1 deletions
diff --git a/examples/widgets/painting/affine/affine.pro b/examples/widgets/painting/affine/affine.pro
index e94f4d12fb..1f2f8df87f 100644
--- a/examples/widgets/painting/affine/affine.pro
+++ b/examples/widgets/painting/affine/affine.pro
@@ -1,7 +1,7 @@
SOURCES += main.cpp xform.cpp
HEADERS += xform.h
-contains(QT_CONFIG, opengl)|contains(QT_CONFIG, opengles1)|contains(QT_CONFIG, opengles2) {
+qtHaveModule(opengl) {
DEFINES += QT_OPENGL_SUPPORT
QT += opengl
}
diff --git a/examples/widgets/painting/affine/xform.cpp b/examples/widgets/painting/affine/xform.cpp
index a873ba7af8..d4485df0b3 100644
--- a/examples/widgets/painting/affine/xform.cpp
+++ b/examples/widgets/painting/affine/xform.cpp
@@ -251,12 +251,14 @@ void XFormView::timerEvent(QTimerEvent *e)
}
}
+#ifndef QT_NO_WHEELEVENT
void XFormView::wheelEvent(QWheelEvent *e)
{
m_scale += e->delta() / qreal(600);
m_scale = qMax(qreal(0.1), qMin(qreal(4), m_scale));
emit scaleChanged(int(m_scale*1000));
}
+#endif
void XFormView::reset()
{
diff --git a/examples/widgets/painting/affine/xform.h b/examples/widgets/painting/affine/xform.h
index fff92733a0..a04381165d 100644
--- a/examples/widgets/painting/affine/xform.h
+++ b/examples/widgets/painting/affine/xform.h
@@ -116,7 +116,9 @@ signals:
protected:
void timerEvent(QTimerEvent *e);
+#ifndef QT_NO_WHEELEVENT
void wheelEvent(QWheelEvent *);
+#endif
private:
QPolygonF ctrlPoints;