<div dir="ltr"><div class="gmail_extra"><div class="gmail_quote">On Fri, Jul 11, 2014 at 11:58 AM, Rutledge Shawn <span dir="ltr"><<a href="mailto:Shawn.Rutledge@digia.com" target="_blank">Shawn.Rutledge@digia.com</a>></span> wrote:<br>


<blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left-width:1px;border-left-color:rgb(204,204,204);border-left-style:solid;padding-left:1ex"><div><br>
On 11 Jul 2014, at 10:34 AM, Dean Floyd wrote:<br>
<br>
> I have been using the Wacom Cintiq HD 24 Touch for some of my research efforts, and I have tried to use MultiPointTouchArea to handle the touch events, however, this has not lead to a great deal of success. To remedy the situation, I decided to use the Wacom SDK to intercept these events and create my own QML component to do what MultiPointTouchArea usually does, which isn't awfully fast with the signal emitting and all, but sufficiently smooth - I use touch events to control a camera in a 3D scene graph.<br>



<br>
</div>Yeah there is QTBUG-39572 for Linux, but if you are using the Wacom SDK I suppose you must be on Windows.  We plan to get touch working with Wacom touch devices.  I guess your Cintiq is different than the Bamboo relative-touch device (more like a touchpad) which I test with sometimes.</blockquote>


<div><br></div><div>I'm actually on a Macintosh, and some of the boys here are on Windows. By Wacom SDK, I meant the Feel Multi Touch API. MultiPointTouchArea receives touch events generated by the Magic TrackPad on iMac, but not from Cintiq. Do you think this is still related to QTBUG-39572?  </div>

<div><br></div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left-width:1px;border-left-color:rgb(204,204,204);border-left-style:solid;padding-left:1ex">
<div>
> Now, I would like to draw using the Wacom Pen, and, although I can do this through QWidget::tabletEvent(), I was not able to find a suitable QML component which offers the same tabletEvent() functionality. I see some examples using MouseArea to draw with a pen, but I would like to be able to distinguish between a mouse and a pen device. In other words, I would like to intercept QTabletEvent events within QML. Is there a way to do this? If not, could somebody confirm that this is not possible? I would highly appreciate any help. Thank you.<br>



<br>
</div>No there is no support for QTabletEvents in QtQuick 2 yet.  I experimented with it during a hackathon last year; the patch which adds support for them is<br>
<br>
<a href="https://codereview.qt-project.org/#/c/74202/" target="_blank">https://codereview.qt-project.org/#/c/74202/</a><br>
<br></blockquote><div><br></div><div>Splendid! I will surely take a look at it. If I manage to further your efforts on this account, I will most certainly send you patches.</div><div> </div>
<blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left-width:1px;border-left-color:rgb(204,204,204);border-left-style:solid;padding-left:1ex">
But after you've got the events in QtQuick, what next?  We are also missing public API for creating and manipulating polylines and "ink" objects.  You could take the events individually and then try to use Canvas in QML, or implement your own means of using QPainterPath in C++, or use Qt.labs.shapes from<br>



<br>
<a href="https://codereview.qt-project.org/#/admin/projects/playground/scenegraph" target="_blank">https://codereview.qt-project.org/#/admin/projects/playground/scenegraph</a></blockquote><div><br></div><div>I only need the x, y, pressure, and tilt information from the pen. Then I intend to go back to C++, and use our own rendering libraries. There are various reasons why we must use QtQuick, in lieu of QtWidgets. Now I gather this is not possible with QtQuick. Thanks for confirming this.</div>
<div><br></div><div>I looked at Krita, and it appears they are using Wintab for Windows, and the linux-related drivers and libraries for Linux to intercept pen events. I did not find anything suitable for Macintosh there. Does Krita handle pen events in Macintosh? Alternatively, I could use the Cocoa framework to handle the pen events, but I do not wish to enter a world of pain by trying to mix QtQuick and Cocoa. Ideally, we would like to have a QML component that intercepts tabletEvents() akin to QtWidgets.</div>
<div><br></div><div>Thank you for your elaborate answer, and help!</div><div><br></div><div>Dean Floyd</div><div><br></div><div>EPFL</div></div></div></div>