summaryrefslogtreecommitdiffstats
path: root/examples/gestures
diff options
context:
space:
mode:
authorDenis Dzyubenko <denis.dzyubenko@nokia.com>2009-03-16 15:31:05 (GMT)
committerDenis Dzyubenko <denis.dzyubenko@nokia.com>2009-05-11 14:51:38 (GMT)
commit841b10d10943d912fe75674045a740cff29e266c (patch)
tree3589271276898f1b53391d1d4eb1bb7f25b90331 /examples/gestures
parent31d90932bd52d2557a9f1b164632e879105ce67b (diff)
downloadQt-841b10d10943d912fe75674045a740cff29e266c.zip
Qt-841b10d10943d912fe75674045a740cff29e266c.tar.gz
Qt-841b10d10943d912fe75674045a740cff29e266c.tar.bz2
Removed QWidget::gestureEvent() functions since adding a new virtual
function breaks binary compatibility.
Diffstat (limited to 'examples/gestures')
-rw-r--r--examples/gestures/imageviewer/imagewidget.cpp9
-rw-r--r--examples/gestures/imageviewer/imagewidget.h1
2 files changed, 10 insertions, 0 deletions
diff --git a/examples/gestures/imageviewer/imagewidget.cpp b/examples/gestures/imageviewer/imagewidget.cpp
index 0a279ca..b3c92bc 100644
--- a/examples/gestures/imageviewer/imagewidget.cpp
+++ b/examples/gestures/imageviewer/imagewidget.cpp
@@ -131,6 +131,15 @@ void ImageWidget::paintEvent(QPaintEvent*)
p.restore();
}
+bool ImageWidget::event(QEvent *event)
+{
+ if (event->type() == QEvent::Gesture) {
+ gestureEvent(static_cast<QGestureEvent*>(event));
+ return true;
+ }
+ return QWidget::event(event);
+}
+
void ImageWidget::gestureEvent(QGestureEvent *event)
{
touchFeedback.doubleTapped = false;
diff --git a/examples/gestures/imageviewer/imagewidget.h b/examples/gestures/imageviewer/imagewidget.h
index 56fcb40..3f3ff96 100644
--- a/examples/gestures/imageviewer/imagewidget.h
+++ b/examples/gestures/imageviewer/imagewidget.h
@@ -56,6 +56,7 @@ public:
void openDirectory(const QString &path);
protected:
+ bool event(QEvent *event);
void paintEvent(QPaintEvent*);
void gestureEvent(QGestureEvent *event);
void resizeEvent(QResizeEvent*);