I have a list view with few items, and I want to select, for example, first item (from code)! Very simple, but... QListView haven't something like "selectItem(index)" (like QTableView has "selectRow(index)")!? Very strange!
I tried everything, but can't figured how this works with Views and Models!? Can somebody, please, help me, and write simple example how to do that?
I working with my class ListModel, which is derived from QtCore.QAbstractListModel... I redefined methods rowCount, data, setAllData and flags! I now that I must use QListView's method setSelection (self, QRect, QItemSelectionModel.SelectionFlags), but I can't figured how to define QItemSelectionModel.SelectionFlags?
Please help me with some example?
Thanks in advance!
Kind regards!