PDA

View Full Version : Selection row in QtreeView



visor_ua
15th June 2008, 10:40
Using QtreeView ( QAbstractItemView::SingleSelection, QAbstractItemView::SelectRows ) with own QStandardItemModel based model.
Selected row.
If clicking on blank space in window - row lost selection. How to make inpossible lost row selection in this situation (like in address book example).

jpn
15th June 2008, 18:44
If clicking on blank space in window - row lost selection. How to make inpossible lost row selection in this situation (like in address book example).
Hmm, for me it doesn't lose the selection. I tried with Qt 4.4.0 both plastique and winxp styles. Anyway, you could adjust the behavior by reimplementing QAbstractItemView::selectionCommand().

wysota
15th June 2008, 22:31
It might depend on the flags being set on the view... I know it is or used to be the case with a list view.