如何滚动到 QML TreeView 中的特定行
How to scroll to certain row in QML TreeView
在 TreeView
中,通过单击选择一行。
但是我想通过指示行 QModelIndex
和 roleName
.
来关注 TreeView
中的行
我在ListView
中发现了类似的功能:
positionViewAtIndex(int index, PositionMode mode)
如何在 TreeView
中执行此操作?
尝试使用隐藏变量__listView。
__listView.positionViewAtIndex(row, mode)
在 TreeView
中,通过单击选择一行。
但是我想通过指示行 QModelIndex
和 roleName
.
TreeView
中的行
我在ListView
中发现了类似的功能:
positionViewAtIndex(int index, PositionMode mode)
如何在 TreeView
中执行此操作?
尝试使用隐藏变量__listView。
__listView.positionViewAtIndex(row, mode)