[Qt-interest] General problem with selection in QAbstractItemViewclasses (QListXXX QTreeXXX etc)
Zeljko
zeljko at holobit.net
Thu Jun 30 08:37:43 CEST 2011
Tony Rietwyk wrote:
> 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.
Delphi is something different, it uses winapi and it have known behaviour ...
in this case - correct. winapi ListView is properly updated when selection
occurs, you can clearly see that item is selected when mousepress occurs.
> Unfortunately, design decisions such as this rarely get fixed - there is
> simply too much code that has already been written based on it.
If it's by design, then it's bad design, so there's nothing to be fixed, I just
hope that in 5.0 it will be as it should be.
zeljko
More information about the Qt-interest-old
mailing list