From f775f6dd887e1744816d1320fd50092df93f0371 Mon Sep 17 00:00:00 2001 From: Montel Laurent Date: Sun, 2 Dec 2012 22:53:25 +0100 Subject: Fix compile with -DQT_NO_WHEELEVENT Change-Id: Icc345e2a361fc233d7debfa88bef2a3a8375fa8f Reviewed-by: David Faure --- examples/widgets/graphicsview/elasticnodes/graphwidget.cpp | 2 ++ examples/widgets/graphicsview/elasticnodes/graphwidget.h | 2 ++ 2 files changed, 4 insertions(+) (limited to 'examples/widgets/graphicsview/elasticnodes') diff --git a/examples/widgets/graphicsview/elasticnodes/graphwidget.cpp b/examples/widgets/graphicsview/elasticnodes/graphwidget.cpp index 67b6088079..b501a4f3c1 100644 --- a/examples/widgets/graphicsview/elasticnodes/graphwidget.cpp +++ b/examples/widgets/graphicsview/elasticnodes/graphwidget.cpp @@ -174,12 +174,14 @@ void GraphWidget::timerEvent(QTimerEvent *event) } //! [4] +#ifndef QT_NO_WHEELEVENT //! [5] void GraphWidget::wheelEvent(QWheelEvent *event) { scaleView(pow((double)2, -event->delta() / 240.0)); } //! [5] +#endif //! [6] void GraphWidget::drawBackground(QPainter *painter, const QRectF &rect) diff --git a/examples/widgets/graphicsview/elasticnodes/graphwidget.h b/examples/widgets/graphicsview/elasticnodes/graphwidget.h index 064d3bf00a..202c17c204 100644 --- a/examples/widgets/graphicsview/elasticnodes/graphwidget.h +++ b/examples/widgets/graphicsview/elasticnodes/graphwidget.h @@ -63,7 +63,9 @@ public slots: protected: void keyPressEvent(QKeyEvent *event); void timerEvent(QTimerEvent *event); +#ifndef QT_NO_WHEELEVENT void wheelEvent(QWheelEvent *event); +#endif void drawBackground(QPainter *painter, const QRectF &rect); void scaleView(qreal scaleFactor); -- cgit v1.2.3