Tree widget
Tree widget is a tree view that displays and controls items and allows adding new items to the tree at any time. You can select one or several items (depending on the "selectionMode") and sort (see "setSorting" and "showSortIndicator") the list in ascending or descending order by any column.
Available functions | Description |
---|---|
"addColumn" | Adds a column to a tree widget. |
"adjustColumn" | Adjusts the width of a column to accommodate the widest entry. |
"allColumnsShowFocus" | Shows the focus for all columns of a tree widget. |
"animated" | Shows an animation for expanding and collapsing of branches. |
"autoCheckParent" | Sets how a parent node should react if the checked state of its child nodes changes. |
"appendItem, "appendItemNC" | The attributes "appendItem" and "appendItemNC" both add an item to a tree widget. The difference between the attributes is that appendItemNC does not check for duplicates meaning if an element already exists. Use appendItemNC for new tree widgets when it is not necessary to check the duplicates. |
"autoExpandDelay" | Sets the delay time before items in a tree are opened or closed during a drag and drop operation. |
"autoScroll" | This attribute is used to enable auto-scrolling in drag move events. The attribute also returns TRUE if auto-scrolling in drag move events has been enabled, otherwise it returns FALSE. |
"autoScrollMargin" | Sets the size of the area where auto-scrolling is triggered. |
"childCount" | The function "childCount" returns the number of sub elements. |
"children" | The function "children" returns the sub elements of a tree widget. |
"clear" | Deletes the items of a tree widget. |
"clearSelection" | Removes the marking of all items in a tree widget. |
"columns" | Returns the number of columns (tree widget). |
"columnWidthMode" | Shows which mode is set for a particular column. |
"contentsX, "contentsY" | The attributes contentsX and contentsY return the coordinates of a TextEdit text or of a tree widget. Attribute contentsX returns the X coordinate of the contents (text) on the left side of a view. Attribute contentsY returns the Y coordinate of the contents (text) at the top of the view. |
"currentItem" | Returns the ID of the element that has the keyboard focus. |
"defaultRenameAction" | The attribute "defaultRenameAction" specifies what action will be performed when the editor loses focus during renaming. (became obsolete with version 3.12) |
"dragEnabled","dropEnabled" | With the aid of these functions you can query whether the Drag and Drop was enabled for the elements of the tree widget. |
"dropIndicatorPosition" | Returns the position of the drop. |
"editTriggers" | Sets the action that will initiate item editing. |
"ensureItemVisible" | The attribute "ensureItemVisible" ensures that an item is visible, by scrolling the list view vertically if necessary and opening any parent items, if required to display the item. |
"expandsOnDoubleClick" | Specifies if the user can expand and collapse items interactively. |
"focus" | The attribute "focus" returns TRUE if the object has the focus. |
"focusEnabled" | Indicates whether the widget accepts keyboard focus. |
"frameShadow" | The attribute "frameShadow" specifies the frame effect (3D effect) of an object (textEdit, progress bar, tree widget, thumb wheel, LCD number or zoom navigator). |
"frameShape" | The attribute "frameShape" sets the style of a textEdit frame, thumb wheel, tree widget, zoom navigator , LCD number or progress bar. |
"frameWidth" | The attribute "frameWidth" returns the width of a frame (textEdit, tree widget, zoom navigator, LCD number or thumb wheel). |
"getAlignment" | Returns the current alignment. |
"getBackColor" | The attribute "getBackColor" returns the background color of an item. |
"getCellGeometry" | Delivers the cell geometry. |
"getCheckedItems" | Returns a list of all checked items inside the Tree Widget. |
"getCheckState" | Allows to query the checked state of a tree widget item. |
"getFont" | The attribute "getFont" returns the font of an item. |
"getForeColor" | The attribute "getForeColor" returns the foreground color of an item. |
"getItemsCheckState" | Returns a mapping with the element ID as a key and the checked state as a value. |
"getText" | Returns the text of an element. |
"getToolTip" | Returns the defined tooltip text of an item in a tree widget. |
"getUncheckedItems" | Returns a list of all items which are not checked inside a Tree Widget. |
"headerHidden" | Sets whether the header is shown or not. |
"height" | The attribute "height" returns the height of an object (textEdit, progress bar, tree widget, zoom navigator, LCD number or thumb wheel). |
"hideColumn" | Hides a column of a tree widget. |
"hScrollBarMode" | The attribute "hScrollBarMode" sets the horizontal scroll bar mode of a textEdit, tree widget or table. |
"insertItem, insertItemNC" | The attributes "insertItem" and "insertItemNC" both add an item to a tree widget. The difference between the two attributes is that insertItemNC does not check for duplicates meaning if an element already exists. Use insertItemNC for new tree widgets when it is not necessary to check the duplicates. |
"isActiveWindow" | The attribute "isActiveWindow" returns TRUE if this widget is the active window, otherwise FALSE. |
"isCheckable" | Allows to query whether an item of a Tree Widget is checkable or not. |
"isChecked" | Allows to query whether an item is checked or not. |
"isColumnHidden" | Shows if a particular column is visible. |
"isEnabled" | Shows if an element has been enabled (see "setEnabled"). |
"isExpandable" | Returns TRUE if an element is expandable even when it has no child elements, otherwise returns FALSE. |
"isOpen" | Returns TRUE if a tree widget element has children and they are not explicitly hidden, otherwise returns FALSE. |
"isVisible" | Returns TRUE if an item is visible. |
"itemAbove", itemBelow" | The function "itemAbove" returns the item above a specified item and "itemBelow" returns the item below a specified item. |
"itemExists" | Checks whether the specified item exists in a tree widget. |
"itemMargin" - obsolete | The function "itemMargin" sets the item margin for tree widget items. (became obsolete with version 3.12) |
"itemsExpandable" | Sets if the user is able to expand and collapse items interactively. |
"lineWidth" | The attribute "lineWidth" sets the width of an object line (textEdit, progress bar, tree widget, zoom navigator, LCD number or thumb wheel (frame)). |
"margin" - obsolete | The attribute "margin" specifies the distance between the innermost pixel of a frame and the outermost pixel of the rectangle inside this frame. (became obsolete with version 3.12) |
"maximumHeight","maximumWidth" | The attribute "maximumHeight" returns the maximum height of a textEdit (excluding any window frame), tree widget or slider and the attribute "maximumWidth" returns the maximum width of a textEdit, tree widget or slider. |
"minimumHeight", "minimumWidth" | The attribute "minimumHeight" returns the minimum height of a textEdit (excluding any window frame), tree widget or slider and the attribute "minimumWidth" returns the minimum width of a textEdit, tree widget or slider. |
"midLineWidth" | The attribute "midLineWidth" sets the width of the mid line (content) of an object (thumb wheel, tree widget, zoom navigator, LCD number or progress bar). |
"moveItem" | Changes the place of an item in the tree widget. |
"multiSelection" | Allows to select several items of a tree widget at the same time (using SHIFT or CTRL). (replaced by "selectionMode" since version 3.11) |
"ownCursor" | The attribute "ownCursor" returns TRUE if a an object (textEdit, tree widget, slider, zoom navigator or thumb wheel) uses its own cursor. If the value is FALSE, the object uses its parent widget's cursor. |
"ownFont" | The attribute "ownFont" returns TRUE if an object (textEdit, slider, zoom navigator or tree widget) uses its own font. If the value is FALSE, the object uses its parent widget's font. |
"parent" | Returns the parent of an item or an empty string if the item has no parent. |
"removeColumn" | Removes a column of a tree widget. |
"removeItem" | Deletes the specified entry. |
"removeItems" | Deletes the specified items. |
"resizeMode" - obsolete | This attribute specifies whether all, none or the the last column only should be resized. (became obsolete with version 3.12) |
"rootIsDecorated" | The attribute "rootIsDecorated" specifies whether the tree view shows open and close signs on root items. |
"selectedItem" | The attribute "selectedItem" returns the selected item if the tree widget is in single selection mode and an item has been selected. |
"selectedItems" | The attribute "selectedItems" returns the selected items if the tree widget is in multi selection mode and items have been selected. |
"selectionBehavior" | This property sets whether selections are done in terms of single items, rows or columns. |
"selectionMode" | The attribute "selectionMode" specifies how a tree view reacts to selection by a user. |
"setAllChecked" | Sets all items of a tree widget to the state checked. |
"setAlignment" | Sets the alignment. |
"setBackColor" | The attribute "setBackColor" sets the background color of an item. |
"setCheckable" | Sets if a node is checkable inside a tree widget. |
"setChecked" | Sets the checked state of one or more tree widget items. |
"setColumnWidth" | Sets the column width (column of a tree widget). |
"setColumnWidthMode" | The attribute addColumn() creates a column with "maximum" as width-mode. This means that a column will be adapted to accommodate the widest entry. The function setColumnWidthMode() allows changing the width mode to "manual" which does not adjust the width. |
"setDragEnabled", "setDropEnabled" | The functions enable the drag and drop at runtime for the tree widget. |
"setEnabled" | Enables or disables an item. |
"setExpandable" | Sets an item to be expandable although it has no children if enable is TRUE and to be expandable only when it has children if enable is FALSE. |
"setFont" | The attribute "setFont" sets the font of an item. |
"setForeColor" | The attribute "setForeColor" sets the foreground color of an item. |
"setIcon" | Sets an icon for a line in the tree widget. |
"setIconAdjusted" | Sets an icon for a line in the tree widget and adjusts the size to the available space. |
"setOpen" | Sets item to open if open is TRUE and item is expandable or to closed if open is FALSE. |
"setRenameEnabled" | The attribute "setRenameEnabled" specifies if an item can be in-place renamed in a column. |
"setResizeEnabled" | Prevents columns to be resized or allows all columns to be resized. |
"setSelectedItem" | Selects the specified item. |
"setSelectedItems" | Selects the specified items. |
"setSorting" | Arranges the items alphabetically in ascending order. |
"setText" | Sets a text of an item. |
"setToolTip" | Specifies the tooltip text for the selective items in a column of a tree widget. |
"setVisible" | Sets an item to visible. |
"showDropIndicator" | Sets whether the drop indicator is shown during a drag and drop operation. |
"showHeader" | Shows the header of a tree widget or hides it. |
"showSortIndicator" | By using "showSortIndicator", you can sort columns by clicking on their headers. |
"showToolTips" - obsolete | Specifies whether the tree view will show tool tips for truncated column texts. (became obsolete with version 3.12) |
"startRename" | If in-place renaming of a specified item has been enabled (see "setRenameEnabled"), this function starts renaming the item in the specified column by creating and initializing an edit box. |
"sortingEnabled" | Sets if sorting is enabled. |
"treeStepSize" | Specifies the number of pixels a child is offset from its parent. |
"underMouse" | Returns TRUE if the widget (textEdit, slider, thumb wheel, tree widget, zoom navigator, LCD number or progress bar) is beneath the cursor. |
"updatesEnabled" | Specifies whether updates of a widget have been enabled. |
"visibleHeight" | This property holds the vertical amount of the visible content. |
"visibleWidth" | This property holds the horizontal amount of the visible content. |
"vScrollBarMode" | The attribute "vScrollBarMode" sets the vertical scroll bar mode of a textEdit, tree widget or table. |