标签: qtreeview
thumbnail

qtreeview怎么获取根节点

在QTreeView中,可以使用model()方法获取treeview所使用的model。然后使用model的index()方法获取根节点的index,再使用model的parent()方法获取该节点的父节……