Results 1 to 4 of 4

Thread: QAction slot called twice if triggered with a touch screen

  1. #1
    Join Date
    Dec 2009
    Posts
    29
    Thanks
    2
    Thanked 1 Time in 1 Post
    Qt products
    Qt4
    Platforms
    MacOS X Unix/X11 Windows

    Default QAction slot called twice if triggered with a touch screen

    Hello,

    I am testing with windows7/msvc2010-32bits/qt5.0.1

    I have several QMenu (context menus through right-click) containing some QActions. If I use the mouse no problem. If I touch the screen to trigger the action, then my slot is called twice. The only thing I found to fix this is to disable the action just when I enter the first time in the slot.... but of course I don't want to do that on all the menus and actions...

    The strange thing is that using the mouse, the slot is called only once as it should be. It is called twice only if I "tap" the menu entry with my finger. Is this normal behavior and is there eventually something I can do to avoid it?

    Thanks

  2. #2
    Join Date
    Dec 2009
    Posts
    29
    Thanks
    2
    Thanked 1 Time in 1 Post
    Qt products
    Qt4
    Platforms
    MacOS X Unix/X11 Windows

    Default Re: QAction slot called twice if triggered with a touch screen

    In fact it does that on everything, including buttons in dialogboxes. Each time you click on something "with-a-touchscreen-tap" the event is send twice. Sounds like a bug in qt5.0.1...

  3. The following user says thank you to maitai for this useful post:

    anthonysaunier (10th April 2013)

  4. #3
    Join Date
    Apr 2013
    Posts
    1
    Thanks
    1
    Qt products
    Qt5
    Platforms
    MacOS X Windows Android

    Default Re: QAction slot called twice if triggered with a touch screen

    Hello,

    I have the same problem, did you found a solution ?

    Thanks

  5. #4
    Join Date
    Apr 2013
    Posts
    2
    Qt products
    Qt4
    Platforms
    Unix/X11 Windows

    Lightbulb Re: QAction slot called twice if triggered with a touch screen

    Ironically, I am having the opposite problem in Qt 4.7.4... I tap on my touchscreen and nothing happens. No clicked() signal is called at all. I'm hoping that your fix will shed light on my issue, as well.

Similar Threads

  1. QAction, triggered signal dont call a slot
    By kaszewczyk in forum Newbie
    Replies: 6
    Last Post: 5th October 2010, 22:30
  2. Finding which widget has triggered a slot
    By ouekah in forum Newbie
    Replies: 4
    Last Post: 26th April 2010, 14:40
  3. Replies: 8
    Last Post: 10th December 2009, 11:06
  4. Touch screen
    By rchaitanya in forum Qt for Embedded and Mobile
    Replies: 1
    Last Post: 19th January 2009, 14:40
  5. Replies: 2
    Last Post: 27th February 2007, 22:06

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.