TTkTreeWidgetItem🌶️
- class TTkTreeWidgetItem(*args, parent: Self = None, expanded: bool = False, selected: bool = False, hidden: bool = False, icon: TTkString = None, childIndicatorPolicy: ChildIndicatorPolicy = 2, **kwargs)[source]🌶️
Bases:
TTkAbstractItemModel
The
TTkTreeWidgetItem
class provides an item for use with the :py:class:’TTkTree’ convenience class.Tree widget items are used to hold rows of information for tree widgets. Rows usually contain several columns of data, each of which can contain a
TTkString
label and an icon or aTTkWidget
.Items are usually constructed with a parent that is
TTkTreeWidgetItem
(for items on lower levels of the tree). For example, the following code constructs a top-level item to represent cities of the world, and adds a entry for Oslo as a child item:cities = TTkWidgetItem(["Cities"]) osloItem = TTkWidgetItem(["Oslo"], parent=cities)
or
cities = TTkWidgetItem(["Cities"]) osloItem = TTkWidgetItem(["Oslo"] cities.addChild(osloItem)
Slots🌶️
Methods🌶️
TTkTreeWidgetItem Attributes🌶️
|
|
|