PDA

View Full Version : How to tell which row is selected in a QtreeView



Valheru
9th November 2007, 19:12
I have a QTreeView with a subclassed QStandardModel, and I am having difficulty in determining which row(s) is(are) selected. The items are checkable, but in some cases I wish to check which items have been selected by the user so that I can let the user set them to be checked with the click of a button. I can't find out how to do this. Does anyone know how?

jpn
9th November 2007, 20:19
Look at QAbstractItemView::selectionModel() and QItemSelectionModel.

Valheru
9th November 2007, 23:10
That did it, thanks.