Combined events in QT



  • Hey there,

    i am pretty new to QT and C++ development, and this is my first post here.
    Since im forced to use QT in my development, i would like to know, if it is possible to combine events with eachother.

    Yet, i do not know much about QTs event system and how events are propagated, but lets imagine, i would like to combine touch/mouse gestures with pen input?

    Is that possible in QT and are there any starting points?

    i appreciate for any hint



  • No one, any idea on this??


  • Moderators

    Depends on how you would define "combine" from your post.

    You can definitely do a lot, but I don't know what you intend. AFAIK, pen input is already handled the same as mouse input and touch by default.



  • thanks for your reply!

    What i want sound maybe simple, but i still cannot figure ist out.

    I would like to be able to receive tabletEvents and touchEvent simultaneously.
    At the moment it seems that when using the pen on a wacom tablet, all other events are disabled.

    Lets say i have a Wacom tablet. The driver officially supports simultaneous touch and pen data.
    Now i would like to be able to receive the tabletEvent (when using the pen) and the touchEvent(when using my finger) at the same time, to combine them to each other.

    I cannot get it, since the pen seems to disable the touch!!

    Any hints on this, would be greatly apprechiated


  • Moderators

    I see. This is way out of my standard area of expertise, but here are some things to consider:

    • make sure the driver does support that simultaneous input. However unlikely, it might be driver's fault
    • sadly, tablet support code in Qt has not been updated in months (if not years), and AFAIK this is not going to change any time soon (although it might - sometimes this is discussed on dev mailing list)
    • I was about to propose using the tablet event itself. Check even data, maybe there is something on remaining input places, or at least you can jump to native Wacom APIs at this point
    • events in the event queue are (surprise!) queued, so strictly combining them together as one is not really possible, although various tricks may be possible

    I'm surprised touch events are blocked. So if you don't use the pen, only fingers, how does the situation change, event-wise?



  • When starting by touching the screen with my finger, it is no problem to listen on the touchEvents.

    So now when moving my fingers still on the screen (generates QEvent::TouchUpdate), i am touching the screen with the pen. The generated touchEvents immediatley stopping the propagation and the tabletEvent starts it propagation. When now touching the screen with a new finger, the screen does not respond to that input. E.g. no touchEvent gets generated.

    It seems that the pen has a higher priority when capturing input.


  • Moderators

    Too big for me, I have no experience in tablet input. Please consider asking on "interest or even development mailing lists":http://lists.qt-project.org/mailman/listinfo.



  • Thanks for your efforts and for the hint with the link.

    I was looking for something like this, just missed it.

    If i ever achieve something interessting, i will post it here.


Log in to reply
 

Looks like your connection to Qt Forum was lost, please wait while we try to reconnect.