summaryrefslogtreecommitdiffstats
path: root/examples/touch/fingerpaint/scribblearea.cpp
diff options
context:
space:
mode:
authorOswald Buddenhagen <oswald.buddenhagen@theqtcompany.com>2015-06-01 19:44:29 +0200
committerOswald Buddenhagen <oswald.buddenhagen@theqtcompany.com>2015-06-01 19:44:29 +0200
commit6e008cd57955c8029671c4c92250b86767f8ec1f (patch)
treead5fe258f7203a733fbdd231918acd540727a2fb /examples/touch/fingerpaint/scribblearea.cpp
parent275709fb43c154ccb1d95391f4829bd1aecebb12 (diff)
parent6fba3c1904aa7601722a70099d88126191cf60cf (diff)
Merge 5.5 into 5.5.0
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));