On Fri, Jul 11, 2014 at 11:58 AM, Rutledge Shawn <[email protected]> wrote:
> > On 11 Jul 2014, at 10:34 AM, Dean Floyd wrote: > > > 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. > > 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. 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? > 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. > > 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 > > https://codereview.qt-project.org/#/c/74202/ > > 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. > 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 > > https://codereview.qt-project.org/#/admin/projects/playground/scenegraph 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. 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. Thank you for your elaborate answer, and help! Dean Floyd EPFL
_______________________________________________ Development mailing list [email protected] http://lists.qt-project.org/mailman/listinfo/development
