QTreeWidgetItem
Creates an item for QTreeWidget.
This class is a JS wrapper around Qt's QTreeWidgetItem class
Example
Hierarchy
↳ QTreeWidgetItem
Index
Constructors
Properties
Methods
- addChild
- child
- childCount
- data
- flags
- icon
- isHidden
- parent
- setCheckState
- setData
- setExpanded
- setFlags
- setHidden
- setIcon
- setSelected
- setText
- text
Constructors
constructor
+ new QTreeWidgetItem(): QTreeWidgetItem
Overrides Component.constructor
Returns: QTreeWidgetItem
+ new QTreeWidgetItem(parent
: QTreeWidgetItem, strings?
: string[]): QTreeWidgetItem
Overrides Component.constructor
Parameters:
Name | Type |
---|---|
parent | QTreeWidgetItem |
strings? | string[] |
Returns: QTreeWidgetItem
+ new QTreeWidgetItem(parent
: QTreeWidget, strings?
: string[]): QTreeWidgetItem
Overrides Component.constructor
Parameters:
Name | Type |
---|---|
parent | QTreeWidget |
strings? | string[] |
Returns: QTreeWidgetItem
+ new QTreeWidgetItem(native
: NativeElement): QTreeWidgetItem
Overrides Component.constructor
Parameters:
Name | Type |
---|---|
native | NativeElement |
Returns: QTreeWidgetItem
+ new QTreeWidgetItem(strings
: string[]): QTreeWidgetItem
Overrides Component.constructor
Parameters:
Name | Type |
---|---|
strings | string[] |
Returns: QTreeWidgetItem
Properties
items
• items: Set‹NativeElement | Component›
native
• native: NativeElement | null
Inherited from Component.native
Methods
addChild
â–¸ addChild(childItem
: QTreeWidgetItem): void
Adds the specified child to this QTreeWidgetItem.
Parameters:
Name | Type | Description |
---|---|---|
childItem | QTreeWidgetItem | The child to add. |
Returns: void
child
â–¸ child(index
: number): QTreeWidgetItem | undefined
Parameters:
Name | Type |
---|---|
index | number |
Returns: QTreeWidgetItem | undefined
childCount
â–¸ childCount(): number
Returns: number
data
â–¸ data(column
: number, role
: ItemDataRole): QVariant
Returns the value for the item's column and role.
Parameters:
Name | Type | Description |
---|---|---|
column | number | The column. |
role | ItemDataRole | The role. |
Returns: QVariant
flags
â–¸ flags(): ItemFlag
Returns the flags used to describe the item. These determine whether the item can be checked, edited, and selected.
Returns: ItemFlag
icon
â–¸ icon(column
: number): QIcon
Returns the icon object for the item.
Parameters:
Name | Type |
---|---|
column | number |
Returns: QIcon
isHidden
â–¸ isHidden(): boolean
Returns: boolean
parent
â–¸ parent(): QTreeWidgetItem | undefined
Returns: QTreeWidgetItem | undefined
setCheckState
â–¸ setCheckState(column
: number, state
: CheckState): void
Sets the item in the given column check state to be state.
Parameters:
Name | Type | Description |
---|---|---|
column | number | The column. |
state | CheckState | The check state. |
Returns: void
setData
â–¸ setData(column
: number, role
: ItemDataRole, value
: QVariantType): void
Sets the value for the item's column and role to the given value. The role describes the type of data specified by value, and is defined by the ItemDataRole enum.
Parameters:
Name | Type | Description |
---|---|---|
column | number | The column. |
role | ItemDataRole | The role. |
value | QVariantType | The value. |
Returns: void
setExpanded
â–¸ setExpanded(expanded
: boolean): void
Parameters:
Name | Type |
---|---|
expanded | boolean |
Returns: void
setFlags
â–¸ setFlags(flags
: ItemFlag): void
Sets the flags for the item to the given flags. These determine whether the item can be selected or modified. This is often used to disable an item.
Parameters:
Name | Type | Description |
---|---|---|
flags | ItemFlag | The flags. |
Returns: void
setHidden
â–¸ setHidden(hide
: boolean): void
Parameters:
Name | Type |
---|---|
hide | boolean |
Returns: void
setIcon
â–¸ setIcon(column
: number, icon
: QIcon): void
Sets the icon for the item.
Parameters:
Name | Type | Description |
---|---|---|
column | number | - |
icon | QIcon | The icon object |
Returns: void
setSelected
â–¸ setSelected(selected
: boolean): void
Parameters:
Name | Type |
---|---|
selected | boolean |
Returns: void
setText
â–¸ setText(column
: number, text
: string): void
Parameters:
Name | Type |
---|---|
column | number |
text | string |
Returns: void
text
â–¸ text(column
: number): string
Parameters:
Name | Type |
---|---|
column | number |
Returns: string