Details
-
Bug
-
Resolution: Out of scope
-
P2: Important
-
4.7.0
-
None
-
Snow leopard, Cocoa (4.7-RC1 and 4.6 series) and Carbon (4.6 series) tested
Description
When a parent widget changes its child widget inbetween a double click event (ie the first click hits child A, and the second click hits child B), the parent does not recognise this as a doubleclick event on Mac. It works as expected on Linux and Windows.
Note that the second click is not propagated at all, and because this second click is absorbed, it is also not possible for the application to simulate the double click event by checking the interval between two consecutive clicks; the second click is simply lost.
(If for any reason this should not count as a legitimate double click, both clicks should at least be treated as two single clicks instead of one single click).
This is perhaps shown more clearly in the attached testcase:
Under Linux and Windows:
- Single click switches the child widget (i.e. the label)
- Double click pops up a messagebox, as well as switches the child widget
Under OS X:
- Single click switches the child widget (i.e. the label)
- Double click switches the child widget, but does not pop up a messagebox
This is an example, of course if the child widgets are both labels you would use
setText() instead of switching. The use case is switching between "simple" and
"detailed" information as child widgets when clicked, and allowing further interaction
via double click.
The expected behaviour is that of Linux and Windows. Since the parent widget handles
the double click event, it shouldn't matter which child widget happened to propagate
the clicks.
To compile it should be enough to do
qmake -project
qmake
make
or the xcode/vs equivalent