[Qt-interest] General problem with selection in QAbstractItemViewclasses (QListXXX QTreeXXX etc)
Bo Thorsen
bo at fioniasoftware.dk
Thu Jun 30 08:53:25 CEST 2011
Den 30-06-2011 02:02, Tony Rietwyk skrev:
> A similar type of problem occurs elsewhere in Qt. A double-click generates
> Press, Release, DoubleClick, Release. I have found that if the DoubleClick
> triggers the dialog to close, then the following Release causes a Clicked to
> occur on whatever widget is now underneath the mouse. This problem never
> occured in Delphi - I assume because it ignores the Release, if it is not
> the same widget as the corresponding Press / DoubleClick (and there's been
> no drag). I worked around the problem by deferring the DoubleClick action
> until the Release. But it feels clunky.
>
> Unfortunately, design decisions such as this rarely get fixed - there is
> simply too much code that has already been written based on it.
You can't "fix" this problem. You can choose to delay mouse presses
until the double click timer expires (which sucks in most cases) or you
will get both a click and a double click.
Sometimes you just can't win.
However, I would like to see more consistency in the mouse handling. The
gestures really should be what we work with, instead of implementing the
mouse handlers. But at the moment, they're just not good enough.
Bo Thorsen,
Fionia Software.
--
Expert Qt and C++ developer for hire
Contact me if you need expert Qt help
http://www.fioniasoftware.dk
More information about the Qt-interest-old
mailing list