diff options
Diffstat (limited to 'examples/multitouch/pinchzoom/graphicsview.cpp')
-rw-r--r-- | examples/multitouch/pinchzoom/graphicsview.cpp | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/examples/multitouch/pinchzoom/graphicsview.cpp b/examples/multitouch/pinchzoom/graphicsview.cpp index ca2f519..969f604 100644 --- a/examples/multitouch/pinchzoom/graphicsview.cpp +++ b/examples/multitouch/pinchzoom/graphicsview.cpp @@ -34,7 +34,7 @@ ** met: http://www.gnu.org/copyleft/gpl.html. ** ** If you are unsure which license is appropriate for your use, please -** contact the sales department at http://www.qtsoftware.com/contact. +** contact the sales department at http://qt.nokia.com/contact. ** $QT_END_LICENSE$ ** ****************************************************************************/ @@ -47,11 +47,11 @@ GraphicsView::GraphicsView(QGraphicsScene *scene, QWidget *parent) : QGraphicsView(scene, parent) { - setAttribute(Qt::WA_AcceptTouchEvents); + viewport()->setAttribute(Qt::WA_AcceptTouchEvents); setDragMode(ScrollHandDrag); } -bool GraphicsView::event(QEvent *event) +bool GraphicsView::viewportEvent(QEvent *event) { switch (event->type()) { case QEvent::TouchBegin: @@ -72,5 +72,5 @@ bool GraphicsView::event(QEvent *event) default: break; } - return QGraphicsView::event(event); + return QGraphicsView::viewportEvent(event); } |