![]() ![]() ![]() Moves the cursor to an item in the same column of the last row of the last top-level item in the model. Moves the cursor to an item in the same column of the first row of the first top-level item in the model. Reveals the children of the current item (if present) by expanding a branch.Įxpands the current item and all its children (if present). Hides the children of the current item (if present) by collapsing a branch. ![]() If the parent of the current item has no more rows to navigate to, the cursor moves to the relevant item in the first row of the sibling that follows the parent. Moves the cursor to the item in the same column on the next row. If the parent of the current item has no more rows to navigate to, the cursor moves to the relevant item in the last row of the sibling that precedes the parent. Moves the cursor to the item in the same column on the previous row. QTreeView supports a set of key bindings that enable the user to navigate in the view and interact with the contents of items: For more information about rearranging sections, see Moving Header Sections. To disable movement of these columns, use QHeaderView ‘s setSectionsMovable() function. If this value is set to true, this property will override the resize mode set on the last section in the header.īy default, all columns in a tree view are movable except the first. Note that each header is configured with its stretchLastSection property set to true, ensuring that the view does not waste any of the space assigned to it for its header. Headers in tree views are constructed using the QHeaderView class and can be hidden using header()->hide(). The amount of indentation used to indicate levels of hierarchy is controlled by the indentation property. When this state changes a collapsed() or expanded() signal is emitted with the model index of the relevant item. Items that have children can be in an expanded (children are visible) or collapsed (children are hidden) state. The model/view architecture ensures that the contents of the tree view are updated as the model changes. currentPath ()) tree = QTreeView () tree. Def setFirstColumnSpanned (row, parent, span) ![]()
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |