Quantcast
Channel: Qt DevNet forums: Qt Quick 1283365070**
Viewing all articles
Browse latest Browse all 4972

Wacom and Qt Quick 2

$
0
0
Hi, I want to retrieve events from a Wacom Bamboo and use them for Zoom, Pan and Rotate behavior in a Qt Quick 2 application. Looking at photosurface example, it seems they are doing something like:       MouseArea       {         id: dragArea         hoverEnabled: true         anchors.fill: parent             onWheel:         {           if (wheel.modifiers & Qt.ControlModifier)           {              ...           }           else           {              ...           }         }       } However, wheel event does not provide enough information to determine the gesture performed. And photosurface example does not work correctly with Wacom Bamboo. So, what is the correct way to integrate Wacom device with a Qt Quick 2 application? ADDITIONAL INFORMATION PAN The events I get are (changing values are surrounded by “<< >>”, specific values with respect to other gestures are surrounded by “== ==”):     wheel.buttons: 0     wheel.modifiers: == 0 ==     wheel.pixelDelta: QPoint(0, 0)     wheel.angleDelta: QPoint(0, << 21 >>)     wheel.x: 205     wheel.y: 279 Here, only one value changed for both vertical and horizontal pan. ZOOM The events I get are (changing values are surrounded by “<< >>”, specific values with respect to other gestures are surrounded by “== ==”): Here, the same value is changing. Note that zoom gesture is sent as a “Ctrl + mouse wheel” event     wheel.buttons: 0     wheel.modifiers: == 67108864 ==     wheel.pixelDelta: QPoint(0, 0)     wheel.angleDelta: QPoint(0, << 40 >>)     wheel.x: 323     wheel.y: 291 ROTATE I get the exact same values as for the ZOOM gesture… Thanks for any help and best regards.

Viewing all articles
Browse latest Browse all 4972

Trending Articles