Results 1 to 4 of 4

Thread: Push button double click

Threaded View

Previous Post Previous Post   Next Post Next Post
  1. #2
    Join Date
    Feb 2006
    Location
    Österreich
    Posts
    35
    Qt products
    Qt3 Qt4
    Platforms
    Unix/X11

    Default Re: Push button double click

    Sorry, but I didn't understand from the message. What exactly is your question? How to ignore the second call? Or how to specifically handle a double click?

    If it is the latter you would intercept the MouseEvent and compare the event's type() with the constant QEvent::MouseButtonDblClick (probably in an if-else or switch()-case statement). If you want to know how to avoid it calling twice, maybe just have a static variable in your subclass implementation which is initialized in the class constructor, then let your new event handler only process the event if the variable is false, otherwise ignore() and pass the data on to the parent. That way the variable dies when the class is destructed and is only run once.
    Last edited by michel; 14th February 2006 at 23:51. Reason: Misspelled a function name
    My philosophy is: If you can use a free, open-source alternative: do it. And if you can't, pretend it's free and open-source and hope you don't get caught.

Similar Threads

  1. Double Click Capturing
    By ToddAtWSU in forum Qt Programming
    Replies: 2
    Last Post: 8th January 2011, 15:12
  2. Replies: 2
    Last Post: 12th January 2009, 00:24
  3. QPaintEvent on button click?
    By vishal.chauhan in forum Qt Programming
    Replies: 1
    Last Post: 5th June 2007, 09:44
  4. QGraphicsScene Click / Double Click
    By philentropist in forum Qt Programming
    Replies: 1
    Last Post: 9th February 2007, 05:32
  5. Replies: 5
    Last Post: 12th January 2006, 16:40

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
  •  
Qt is a trademark of The Qt Company.