Results 1 to 6 of 6

Thread: Combining events in QT

  1. #1
    Join Date
    Nov 2012
    Posts
    18
    Qt products
    Qt4
    Platforms
    MacOS X Unix/X11 Windows

    Default Combining 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

  2. #2
    Join Date
    Jan 2006
    Location
    Warsaw, Poland
    Posts
    33,364
    Thanks
    3
    Thanked 5,012 Times in 4,791 Posts
    Qt products
    Qt3 Qt4 Qt5 Qt/Embedded
    Platforms
    Unix/X11 Windows Android Maemo/MeeGo
    Wiki edits
    10

    Default Re: Combining events in QT

    Combine them in what way?
    Your biological and technological distinctiveness will be added to our own. Resistance is futile.

    Please ask Qt related questions on the forum and not using private messages or visitor messages.


  3. #3
    Join Date
    Nov 2012
    Posts
    18
    Qt products
    Qt4
    Platforms
    MacOS X Unix/X11 Windows

    Default Re: Combining events in QT

    Hey,

    thanks for your reply. Sorry for my late answer, but id did not get a mail from the forum.

    I would like to combine touch input and pen input. Lets say the user touches a screen and is simultanous able to use the pen with his other hand?

    What i want to know is, is it possible to listen for this events in a parallel way? So when listening for touch events, it should always be possible to listen for pen input also?

    Would that be possible?

  4. #4
    Join Date
    Jan 2006
    Location
    Warsaw, Poland
    Posts
    33,364
    Thanks
    3
    Thanked 5,012 Times in 4,791 Posts
    Qt products
    Qt3 Qt4 Qt5 Qt/Embedded
    Platforms
    Unix/X11 Windows Android Maemo/MeeGo
    Wiki edits
    10

    Default Re: Combining events in QT

    It all depends on your input device, I guess. They are not coming at the same moment so they are going to be separate events. It is your responsibility to provide logic that considers them both at once. The pen will probably be a regular mouse event and the touch event is either going to be a mouse event too or a touch event (probably depending on the driver).
    Your biological and technological distinctiveness will be added to our own. Resistance is futile.

    Please ask Qt related questions on the forum and not using private messages or visitor messages.


  5. #5
    Join Date
    Nov 2012
    Posts
    18
    Qt products
    Qt4
    Platforms
    MacOS X Unix/X11 Windows

    Default Re: Combining events in QT

    Hey my device supports this officially. It is a Wacom Cintiq HD touch, officially supporting parallel touch/pen input.
    But iam not able to get both events in qt at teh same time, it seems that teh pen input is higher in priority, disabling the touch.

    Is there anything one can do, to influence on this? I am pretty new to QT, sorrz if i am missing something.

    Thanks a lot

  6. #6
    Join Date
    Mar 2011
    Posts
    82
    Thanks
    13
    Thanked 2 Times in 2 Posts
    Qt products
    Qt4
    Platforms
    Unix/X11 Windows

    Default Re: Combining events in QT

    Isn't the logic behind data-input not far from a state machine?
    Also, are pen and touch both touch events? or is one click and the other touch?
    It's hard to predict what you are trying to do, can you give us a coded example?

    As Wysota said, you do need to provide the logic for handling the input events which, on their own, are meaningless. If one is overriding the other, could it be they are the same type of input? Maybe checking for "isAlreadyPressed" or something along those lines when a new touch/click comes in?

    These are just shots in the dark, to be honest. What you are asking is not out of this world, though.

Similar Threads

  1. Combining include files
    By marcvanriet in forum General Programming
    Replies: 12
    Last Post: 17th October 2010, 09:55
  2. combining wheel events
    By mcarter in forum Qt Programming
    Replies: 1
    Last Post: 13th January 2010, 05:59
  3. Widgets combining CSS and SVG
    By yop in forum Qt Programming
    Replies: 3
    Last Post: 15th October 2008, 10:02
  4. Combining different widgets
    By ShaChris23 in forum Newbie
    Replies: 3
    Last Post: 1st May 2007, 02:23
  5. Combining Qt with other libraries (Boost, ...)
    By Raistlin in forum Qt Programming
    Replies: 2
    Last Post: 13th February 2007, 06:28

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
Digia, Qt and their respective logos are trademarks of Digia Plc in Finland and/or other countries worldwide.