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.
Bookmarks