summaryrefslogtreecommitdiffstats
path: root/examples
diff options
context:
space:
mode:
authorBradley T. Hughes <bradley.hughes@nokia.com>2009-06-05 12:26:22 (GMT)
committerBradley T. Hughes <bradley.hughes@nokia.com>2009-06-05 12:30:02 (GMT)
commit12c315f34ca428c3da38716d2c071a8e94f2acf0 (patch)
tree8daf15e08c88f31d1738ab9ad7e963523b92ab2b /examples
parentbb587db95d7c20344c0bf06a1f080c0a2e4a9250 (diff)
downloadQt-12c315f34ca428c3da38716d2c071a8e94f2acf0.zip
Qt-12c315f34ca428c3da38716d2c071a8e94f2acf0.tar.gz
Qt-12c315f34ca428c3da38716d2c071a8e94f2acf0.tar.bz2
Accept TouchBegin events by default if they are enabled
After an API review round, we agreed that it makes sense for the TouchBegin event to default to accepted if the widget has subscribed to receive touch events.
Diffstat (limited to 'examples')
-rw-r--r--examples/multitouch/fingerpaint/scribblearea.cpp8
-rw-r--r--examples/multitouch/knobs/knob.cpp4
-rw-r--r--examples/multitouch/pinchzoom/graphicsview.cpp1
3 files changed, 3 insertions, 10 deletions
diff --git a/examples/multitouch/fingerpaint/scribblearea.cpp b/examples/multitouch/fingerpaint/scribblearea.cpp
index ffff9bb..71fbd19 100644
--- a/examples/multitouch/fingerpaint/scribblearea.cpp
+++ b/examples/multitouch/fingerpaint/scribblearea.cpp
@@ -206,12 +206,10 @@ bool ScribbleArea::event(QEvent *event)
break;
}
}
-
- event->accept();
- return true;
+ break;
}
default:
- break;
+ return QWidget::event(event);
}
- return QWidget::event(event);
+ return true;
}
diff --git a/examples/multitouch/knobs/knob.cpp b/examples/multitouch/knobs/knob.cpp
index b7cc6f3..bced73c 100644
--- a/examples/multitouch/knobs/knob.cpp
+++ b/examples/multitouch/knobs/knob.cpp
@@ -63,9 +63,6 @@ bool Knob::sceneEvent(QEvent *event)
{
switch (event->type()) {
case QEvent::GraphicsSceneTouchBegin:
- event->accept();
- break;
-
case QEvent::GraphicsSceneTouchUpdate:
case QEvent::GraphicsSceneTouchEnd:
{
@@ -81,7 +78,6 @@ bool Knob::sceneEvent(QEvent *event)
rotate(line2.angleTo(line1));
}
- touchEvent->accept();
break;
}
diff --git a/examples/multitouch/pinchzoom/graphicsview.cpp b/examples/multitouch/pinchzoom/graphicsview.cpp
index f763e6f..0856639 100644
--- a/examples/multitouch/pinchzoom/graphicsview.cpp
+++ b/examples/multitouch/pinchzoom/graphicsview.cpp
@@ -71,7 +71,6 @@ bool GraphicsView::event(QEvent *event)
/ QLineF(touchPoint0->startPos(), touchPoint1->startPos()).length();
setTransform(QTransform().scale(scaleFactor, scaleFactor));
}
- event->accept();
return true;
}
default: