tree_view¶
Module Contents¶
Tree item delegate |
|
Tree view base class |
|
Tree widget |
|
Tree view |
- class TreeItemDelegate(parent: PyQt5.QtWidgets.QTreeView)¶
Bases:
PyQt5.QtWidgets.QStyledItemDelegateTree item delegate
- lightCheckedColor¶
- darkCheckedColor¶
- setCheckedColor(light, dark)¶
set the color of indicator in checked status
Parameters¶
- light, dark: str | QColor | Qt.GlobalColor
color in light/dark theme mode
- paint(painter, option, index)¶
- initStyleOption(option, index)¶
- class TreeViewBase(*args, **kwargs)¶
Tree view base class
- scrollDelagate¶
- setCheckedColor(light, dark)¶
set the color in checked status
Parameters¶
- light, dark: str | QColor | Qt.GlobalColor
color in light/dark theme mode
- drawBranches(painter, rect, index)¶
- setBorderVisible(isVisible: bool)¶
set the visibility of border
- setBorderRadius(radius: int)¶
set the radius of border
- class TreeWidget(parent=None)¶
Bases:
PyQt5.QtWidgets.QTreeWidget,TreeViewBaseTree widget
- viewportEvent(event)¶
Catch the click event to override the item “expand/collapse” function which is still called in the place it was before moving the branches in the drawBranches method.
- class TreeView(parent=None)¶
Bases:
PyQt5.QtWidgets.QTreeView,TreeViewBaseTree view
- viewportEvent(event)¶
Catch the click event to override the item “expand/collapse” function which is still called in the place it was before moving the branches in the drawBranches method.