summaryrefslogtreecommitdiffstats
path: root/examples/touch/fingerpaint/scribblearea.cpp
diff options
context:
space:
mode:
authorPaul Olav Tvete <paul.tvete@theqtcompany.com>2015-06-09 13:59:07 +0200
committerPaul Olav Tvete <paul.tvete@theqtcompany.com>2015-06-09 13:59:07 +0200
commit0963be63ce741ef6c7585358c3f3b1cb806b66e8 (patch)
tree6f4964c196b8a52cb15e9efc0388b6a549574460 /examples/touch/fingerpaint/scribblearea.cpp
parent9e6a1351823b3ee3d7e380248f6ef42ff383b014 (diff)
parenteacfbbf64ef90dad8c5cb6b2c812ad64c1100779 (diff)
Merge remote-tracking branch 'qt/dev' into dev-highdpi
Conflicts: src/gui/kernel/qsimpledrag.cpp src/gui/kernel/qwindowsysteminterface.cpp src/gui/kernel/qwindowsysteminterface_p.h src/plugins/platforms/xcb/qxcbwindow.cpp Change-Id: Icd887552ade61d6a2b2527383970f7145aa00faf
Diffstat (limited to 'examples/touch/fingerpaint/scribblearea.cpp')
-rw-r--r--examples/touch/fingerpaint/scribblearea.cpp5
1 files changed, 3 insertions, 2 deletions
diff --git a/examples/touch/fingerpaint/scribblearea.cpp b/examples/touch/fingerpaint/scribblearea.cpp
index 469c6b1a70..05598c134c 100644
--- a/examples/touch/fingerpaint/scribblearea.cpp
+++ b/examples/touch/fingerpaint/scribblearea.cpp
@@ -187,13 +187,14 @@ bool ScribbleArea::event(QEvent *event)
foreach (const QTouchEvent::TouchPoint &touchPoint, touchPoints) {
switch (touchPoint.state()) {
case Qt::TouchPointStationary:
- // don't do anything if this touch point hasn't moved
+ case Qt::TouchPointReleased:
+ // don't do anything if this touch point hasn't moved or has been released
continue;
default:
{
QRectF rect = touchPoint.rect();
if (rect.isEmpty()) {
- qreal diameter = MinimumDiameter;
+ qreal diameter = MaximumDiameter;
if (touch->device()->capabilities() & QTouchDevice::Pressure)
diameter = MinimumDiameter + (MaximumDiameter - MinimumDiameter) * touchPoint.pressure();
rect.setSize(QSizeF(diameter, diameter));