I want to fire QAbstractItemView::doubleClicked
slot programaticaly for an item that has specific text. I want to do this using QAbstractItemView
class and not it's implementations if possible.
This task boils down to looping over items and comparing strings. But I cannot find any method that would give me all QModelIndex
es. The only method that gives any QModelIndex
without parameters is QAbstractItemView::rootIndex
. But when I look into QModelIndex
docs, I again cannot see a way to access it's children and siblings.
So how to access all QModelIndex
es in QAbstractItemView
?
auto model = index();
is.QModelIndex
doesn't seem to haveoperator()
... Could you explain the code please? – Runyan