Important: Please read the Qt Code of Conduct - https://forum.qt.io/topic/113070/qt-code-of-conduct

Drawing with Apple Pencil?



  • Hello! Has anyone implemented a really nice drawing feature for the Apple Pencil? There is a big difference between applications that simply copy a brush pattern and others that take advantage of the speed and tilt of the pencil in a very fine-tuned way which makes the drawing extremely realistic.

    Has anyone done this with Qt?
    Thanks!



  • It appears that there is a bug in the detection of pressure in the touch device code for iPad Pro. When I hard-code it in to the Qt source (quiview.mm:289) everything works fine. I filed a bug report here:

    QTBUG-59042 Apple Pencil not properly supported on iOS

    Also, as stated in the Qt docs you have to accept the QEvent::TouchBegin event or you won't get the subsequent QEvent::TouchUpdate events.



  • @patrickkidd said in Drawing with Apple Pencil?:

    Hello! Has anyone implemented ...

    It looks like QTouchEvent has a QTouchDevice which returns pressure, velocity, etc. I have no idea if these values are supported yet with Apple Pencil. There doesn't appear to be support for altitude angle (tilt) or event prediction which is what makes the pencil appear so fast.

    Anyone have any more information on these features? Some other way to access them?



  • Or has anyone even received apple pencil events at all, let alone drawing? Do we still need to get the raw apple events and somehow translate them to qt events?



  • It appears that there is a bug in the detection of pressure in the touch device code for iPad Pro. When I hard-code it in to the Qt source (quiview.mm:289) everything works fine. I filed a bug report here:

    QTBUG-59042 Apple Pencil not properly supported on iOS

    Also, as stated in the Qt docs you have to accept the QEvent::TouchBegin event or you won't get the subsequent QEvent::TouchUpdate events.


Log in to reply