[Interest] selection in QTableWidget
Felix morack
felixover at gmail.com
Tue Aug 19 09:59:04 CEST 2014
hello,
the selection (mode: selectitems) in a qtablewidget is by default a square.
For many purposes it would be better if the selection included all items in
between starting point and end point. This is well illustrated here:
https://i.imgur.com/9FBPr5I.png
The question is: how to do this? My first instinct would have been to
derive from QItemSelectionModel and re-implement the various isSelected()
functions. But that isnt very robust and more importantly, it looks like
Qtablewidget::mouseMoveEvent() -> setSelection(...) is doing excessive
calculations and modifications to the selection.
That is a problem because i can hardly mess with the
mouseMoveEvent()....unless i was to derive from QTableWidget and override
setSelection().
Any thoughts on what is the best approach? Users have repeated filed the
"wired" selection behaviour as a bug...
thanks & great day,
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.qt-project.org/pipermail/interest/attachments/20140819/7cb8ba6b/attachment.html>
More information about the Interest
mailing list