diff options
author | Benjamin Poulain <benjamin.poulain@nokia.com> | 2009-08-24 08:42:48 (GMT) |
---|---|---|
committer | Benjamin Poulain <benjamin.poulain@nokia.com> | 2009-08-31 19:01:02 (GMT) |
commit | 258b9c5d5b1d88a5c19ed1dcfb5fed446006de0d (patch) | |
tree | ee2986b282299fc6b6ef4feaafd5e67000bd5dd6 /examples/widgets | |
parent | cef94ba96e4fd45506dff793accd8603765de7f4 (diff) | |
download | Qt-258b9c5d5b1d88a5c19ed1dcfb5fed446006de0d.zip Qt-258b9c5d5b1d88a5c19ed1dcfb5fed446006de0d.tar.gz Qt-258b9c5d5b1d88a5c19ed1dcfb5fed446006de0d.tar.bz2 |
Initialize the line coordinates in the tablet example.
For the first tablet events, polyLine contains null points. The first
two line painted have an invalid origin.
Diffstat (limited to 'examples/widgets')
-rw-r--r-- | examples/widgets/tablet/tabletcanvas.cpp | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/examples/widgets/tablet/tabletcanvas.cpp b/examples/widgets/tablet/tabletcanvas.cpp index abb667c..612a635 100644 --- a/examples/widgets/tablet/tabletcanvas.cpp +++ b/examples/widgets/tablet/tabletcanvas.cpp @@ -98,8 +98,10 @@ void TabletCanvas::tabletEvent(QTabletEvent *event) switch (event->type()) { case QEvent::TabletPress: - if (!deviceDown) + if (!deviceDown) { deviceDown = true; + polyLine[0] = polyLine[1] = polyLine[2] = event->pos(); + } break; case QEvent::TabletRelease: if (deviceDown) |