How can I set QTreeView's current index to a specific value in PyQt6 or PySide6?

110 views Asked by At

i use this offical example https://doc.qt.io/qtforpython-6/examples/example_widgets_itemviews_jsonmodel.html then i want to make vaule be clicked in QTreeView by a specific value。like this enter image description here

maybe it means update treeView's currentIndex

i tried this way ,but QModelIndex can not be updated

index = QModelIndex(3,3,QModelIndex()) view.setCurrentIndex(index)

sorry , my English is not good

0

There are 0 answers