A
A
Alex Alex2018-10-25 00:28:43
Python
Alex Alex, 2018-10-25 00:28:43

Qstandarditem selected how?

There is a QListView with selectionModel(QStandardItemModel)
Is it possible to somehow select 1 item in QListView ?

Answer the question

In order to leave comments, you need to log in

1 answer(s)
A
Alex Alex, 2018-10-25
@GoldenEagle88

sel = QListView.selectionModel()
            sel.select(QStandardItemModel.indexFromItem(QStandardItemModel.item(0)),QtCore.QItemSelectionModel.ClearAndSelect)

maybe it will be useful for someone

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question