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.
Re: Push button double click
My question is why would qt allow this. If the dialog has been closed and there is a buffered click action, shouldn't it just ignore that second click? When the signal is issued, the button is hidden. Working around this is easy enough. It just doesn't seem correct to issue a clicked signal from a button that is hidden.
Re: Push button double click
Quote:
Originally Posted by curtisw
My question is why would qt allow this. If the dialog has been closed and there is a buffered click action, shouldn't it just ignore that second click? When the signal is issued, the button is hidden. Working around this is easy enough. It just doesn't seem correct to issue a clicked signal from a button that is hidden.
It wasn't hidden when you did the second click - so the behaviour is quite correct.