[Qt-interest] Qt4.7 / Mac OS X / mouse event / grab bug/issue?
Kustaa Nyholm
Kustaa.Nyholm at planmeca.com
Tue Sep 28 14:46:58 CEST 2010
Hi,
an observation:
I've got a QPushButton and I've connected the button's 'clicked()' signal to
my slot that creates a new QWidget that basically covers the whole screen.
The purpose of this 'overlay' widget is to catch all mouse events and
and also visually dim all the screen to indicate that we are in this
special mode.
This works great.
However, if I quickly click the button several times, I see that
my overlay widget gets created but I also see that the mouse clicks
get delivered to the QPushButton, even though it is no longer 'visible'
because the overlay widget covers it.
If I pause a little bit after clicking the button then all subsequent
clicks are correctly delivered to the overlay widget. Also if I then
click fast/repeatedly on the overlay widget then the clicks are correctly
delivered.
It looks like th QPushButton is somehow 'holding on' or grabbing the mouse
until there is a long enough pause between clicks.
I don't have a test case which I could share, and since this does not
bother me, I won't spend anymore time investigating this nor will I file
a bug report, but I thought it might be useful to record this incident.
br Kusti
More information about the Qt-interest-old
mailing list