[Qt-interest] QListView selection model
phil prentice
philp.cheer at talktalk.net
Mon Apr 20 22:28:37 CEST 2009
Hi
I have derived a class from QListView. I control the output of the view
using a delegate. Each item consists of various icon data, text and an
arrow. I would like to select one or more of these items using a
QItemSelectionModel. The first problem that I have is that I only want the
selection to be considered if the mouse lies inside of the arrow, so I need
to check the mouse event for its location(when in the QLIstView widget).
Should I consider using....
QItemSelectionModel::SelectionFlags QAbstractItemView::selectionCommand
( const QModelIndex & index, const QEvent * event = 0 ) const [virtual
protected]
????
If so then I have another question and that is for multiple selections
(keyboard = ctr+alt) would I then check something like keypressevent inside
of selectionCommand()?
Or am I totaly going up the wrong garden path???
Thanks for your help
Phil
More information about the Qt-interest-old
mailing list