Skip to content

PythonQt.QtGui.QTreeWidgetItem · declarations 001

Back to PythonQt.QtGui.QTreeWidgetItem

ChildIndicatorPolicy instance-attribute

ChildIndicatorPolicy: type

int([x]) -> integer int(x, base=10) -> integer

Convert a number or string to an integer, or return 0 if no arguments are given. If x is a number, return x.int(). For floating point numbers, this truncates towards zero.

If x is not a number or if base is given, then x must be a string, bytes, or bytearray instance representing an integer literal in the given base. The literal can be preceded by '+' or '-' and be surrounded by whitespace. The base defaults to 10. Valid bases are 0 and 2-36. Base 0 means to interpret the base from the string as an integer literal.

int('0b100', base=0) 4

DontShowIndicator instance-attribute

DontShowIndicator: Any

DontShowIndicatorWhenChildless instance-attribute

DontShowIndicatorWhenChildless: Any

ShowIndicator instance-attribute

ShowIndicator: Any

addChild

addChild(child: Any) -> None

X.addChild(child)

Supplemental documentation: Qt 5 reference:

void QTreeWidgetItem::addChild(QTreeWidgetItem *child)

Appends the child item to the list of children.

See also insertChild() and takeChild().

Upstream PySide2 reference signatures (binding differences may apply):

addChild(self, child: PySide2.QtWidgets.QTreeWidgetItem) -> None

Source: https://doc.qt.io/archives/qt-5.15/qtreewidgetitem.html#addChild

addChildren

addChildren(children: Any) -> None

X.addChildren(children)

Supplemental documentation: Qt 5 reference:

void QTreeWidgetItem::addChildren(const QList\<QTreeWidgetItem *> \&children)

Appends the given list of children to the item.

This function was introduced in Qt 4.1.

See also insertChildren() and takeChildren().

Upstream PySide2 reference signatures (binding differences may apply):

addChildren(self, children: typing.Sequence[PySide2.QtWidgets.QTreeWidgetItem]) -> None

Source: https://doc.qt.io/archives/qt-5.15/qtreewidgetitem.html#addChildren

background

background(column: int) -> Any

X.background(column) -> PythonQt.QtGui.QBrush

Supplemental documentation: Qt 5 reference:

QBrush QTreeWidgetItem::background(int column) const

Returns the brush used to render the background of the specified column.

This function was introduced in Qt 4.2.

See also setBackground() and foreground().

Upstream PySide2 reference signatures (binding differences may apply):

background(self, column: int) -> PySide2.QtGui.QBrush

Source: https://doc.qt.io/archives/qt-5.15/qtreewidgetitem.html#background

checkState

checkState(column: int) -> Any

X.checkState(column)

Supplemental documentation: Qt 5 reference:

Qt::CheckState QTreeWidgetItem::checkState(int column) const

Returns the check state of the label in the given column.

See also setCheckState() and Qt::CheckState.

Upstream PySide2 reference signatures (binding differences may apply):

checkState(self, column: int) -> PySide2.QtCore.Qt.CheckState

Source: https://doc.qt.io/archives/qt-5.15/qtreewidgetitem.html#checkState

child

child(index: int) -> Any

X.child(index) -> PythonQt.QtGui.QTreeWidgetItem

Supplemental documentation: Qt 5 reference:

QTreeWidgetItem *QTreeWidgetItem::child(int index) const

Returns the item at the given index in the list of the item's children.

See also parent().

Upstream PySide2 reference signatures (binding differences may apply):

child(self, index: int) -> PySide2.QtWidgets.QTreeWidgetItem

Source: https://doc.qt.io/archives/qt-5.15/qtreewidgetitem.html#child

childCount

childCount() -> int

X.childCount() -> int

Supplemental documentation: Qt 5 reference:

int QTreeWidgetItem::childCount() const

Returns the number of child items.

Upstream PySide2 reference signatures (binding differences may apply):

childCount(self) -> int

Source: https://doc.qt.io/archives/qt-5.15/qtreewidgetitem.html#childCount

childIndicatorPolicy

childIndicatorPolicy() -> Any

X.childIndicatorPolicy()

Supplemental documentation: Qt 5 reference:

QTreeWidgetItem::ChildIndicatorPolicy QTreeWidgetItem::childIndicatorPolicy() const

Returns the item indicator policy. This policy decides when the tree branch expand/collapse indicator is shown.

See also setChildIndicatorPolicy().

Upstream PySide2 reference signatures (binding differences may apply):

childIndicatorPolicy(self) -> PySide2.QtWidgets.QTreeWidgetItem.ChildIndicatorPolicy

Source: https://doc.qt.io/archives/qt-5.15/qtreewidgetitem.html#childIndicatorPolicy

clone

clone() -> Any

X.clone() -> PythonQt.QtGui.QTreeWidgetItem

Supplemental documentation: Qt 5 reference:

[virtual] QTreeWidgetItem *QTreeWidgetItem::clone() const

Creates a deep copy of the item and of its children.

Upstream PySide2 reference signatures (binding differences may apply):

clone(self) -> PySide2.QtWidgets.QTreeWidgetItem

Source: https://doc.qt.io/archives/qt-5.15/qtreewidgetitem.html#clone

columnCount

columnCount() -> int

X.columnCount() -> int

Supplemental documentation: Qt 5 reference:

int QTreeWidgetItem::columnCount() const

Returns the number of columns in the item.

Upstream PySide2 reference signatures (binding differences may apply):

columnCount(self) -> int

Source: https://doc.qt.io/archives/qt-5.15/qtreewidgetitem.html#columnCount

data

data(column: int, role: int) -> Any

X.data(column, role) -> object

Supplemental documentation: Qt 5 reference:

[virtual] QVariant QTreeWidgetItem::data(int column, int role) const

Returns the value for the item's column and role.

See also setData().

Upstream PySide2 reference signatures (binding differences may apply):

data(self, column: int, role: int) -> typing.Any

Source: https://doc.qt.io/archives/qt-5.15/qtreewidgetitem.html#data

emitDataChanged

emitDataChanged() -> None

X.emitDataChanged()

Supplemental documentation: Qt 5 reference:

[protected] void QTreeWidgetItem::emitDataChanged()

Causes the model associated with this item to emit a dataChanged() signal for this item.

You normally only need to call this function if you have subclassed QTreeWidgetItem and reimplemented data() and/or setData().

This function was introduced in Qt 4.5.

See also setData().

Upstream PySide2 reference signatures (binding differences may apply):

emitDataChanged(self) -> None

Source: https://doc.qt.io/archives/qt-5.15/qtreewidgetitem.html#emitDataChanged

flags

flags() -> Any

X.flags()

Supplemental documentation: Qt 5 reference:

Qt::ItemFlags QTreeWidgetItem::flags() const

Returns the flags used to describe the item. These determine whether the item can be checked, edited, and selected.

The default value for flags is Qt::ItemIsSelectable | Qt::ItemIsUserCheckable | Qt::ItemIsEnabled | Qt::ItemIsDragEnabled | Qt::ItemIsDropEnabled.

See also setFlags().

Upstream PySide2 reference signatures (binding differences may apply):

flags(self) -> PySide2.QtCore.Qt.ItemFlags

Source: https://doc.qt.io/archives/qt-5.15/qtreewidgetitem.html#flags

font

font(column: int) -> Any

X.font(column) -> PythonQt.QtGui.QFont

Supplemental documentation: Qt 5 reference:

QFont QTreeWidgetItem::font(int column) const

Returns the font used to render the text in the specified column.

See also setFont().

Upstream PySide2 reference signatures (binding differences may apply):

font(self, column: int) -> PySide2.QtGui.QFont

Source: https://doc.qt.io/archives/qt-5.15/qtreewidgetitem.html#font

foreground

foreground(column: int) -> Any

X.foreground(column) -> PythonQt.QtGui.QBrush

Supplemental documentation: Qt 5 reference:

QBrush QTreeWidgetItem::foreground(int column) const

Returns the brush used to render the foreground (e.g. text) of the specified column. Setting a default-constructed brush will let the view use the default color from the style.

This function was introduced in Qt 4.2.

See also setForeground() and background().

Upstream PySide2 reference signatures (binding differences may apply):

foreground(self, column: int) -> PySide2.QtGui.QBrush

Source: https://doc.qt.io/archives/qt-5.15/qtreewidgetitem.html#foreground

icon

icon(column: int) -> Any

X.icon(column) -> PythonQt.QtGui.QIcon

Supplemental documentation: Qt 5 reference:

QIcon QTreeWidgetItem::icon(int column) const

Returns the icon that is displayed in the specified column.

See also setIcon() and iconSize.

Upstream PySide2 reference signatures (binding differences may apply):

icon(self, column: int) -> PySide2.QtGui.QIcon

Source: https://doc.qt.io/archives/qt-5.15/qtreewidgetitem.html#icon

indexOfChild

indexOfChild(child: Any) -> int

X.indexOfChild(child) -> int

Supplemental documentation: Qt 5 reference:

int QTreeWidgetItem::indexOfChild(QTreeWidgetItem *child) const

Returns the index of the given child in the item's list of children.

Upstream PySide2 reference signatures (binding differences may apply):

indexOfChild(self, child: PySide2.QtWidgets.QTreeWidgetItem) -> int

Source: https://doc.qt.io/archives/qt-5.15/qtreewidgetitem.html#indexOfChild

insertChild

insertChild(index: int, child: Any) -> None

X.insertChild(index, child)

Supplemental documentation: Qt 5 reference:

void QTreeWidgetItem::insertChild(int index, QTreeWidgetItem *child)

Inserts the child item at index in the list of children.

If the child has already been inserted somewhere else it won't be inserted again.

Upstream PySide2 reference signatures (binding differences may apply):

insertChild(self, index: int, child: PySide2.QtWidgets.QTreeWidgetItem) -> None

Source: https://doc.qt.io/archives/qt-5.15/qtreewidgetitem.html#insertChild

insertChildren

insertChildren(index: int, children: Any) -> None

X.insertChildren(index, children)

Supplemental documentation: Qt 5 reference:

void QTreeWidgetItem::insertChildren(int index, const QList\<QTreeWidgetItem *> \&children)

Inserts the given list of children into the list of the item children at index .

Children that have already been inserted somewhere else won't be inserted.

This function was introduced in Qt 4.1.

Upstream PySide2 reference signatures (binding differences may apply):

insertChildren(self, index: int, children: typing.Sequence[PySide2.QtWidgets.QTreeWidgetItem]) -> None

Source: https://doc.qt.io/archives/qt-5.15/qtreewidgetitem.html#insertChildren

isDisabled

isDisabled() -> bool

X.isDisabled() -> bool

Supplemental documentation: Qt 5 reference:

bool QTreeWidgetItem::isDisabled() const

Returns true if the item is disabled; otherwise returns false.

This function was introduced in Qt 4.3.

See also setFlags().

Upstream PySide2 reference signatures (binding differences may apply):

isDisabled(self) -> bool

Source: https://doc.qt.io/archives/qt-5.15/qtreewidgetitem.html#isDisabled

isExpanded

isExpanded() -> bool

X.isExpanded() -> bool

Supplemental documentation: Qt 5 reference:

bool QTreeWidgetItem::isExpanded() const

Returns true if the item is expanded, otherwise returns false.

This function was introduced in Qt 4.2.

See also setExpanded().

Upstream PySide2 reference signatures (binding differences may apply):

isExpanded(self) -> bool

Source: https://doc.qt.io/archives/qt-5.15/qtreewidgetitem.html#isExpanded

isFirstColumnSpanned

isFirstColumnSpanned() -> bool

X.isFirstColumnSpanned() -> bool

Supplemental documentation: Qt 5 reference:

bool QTreeWidgetItem::isFirstColumnSpanned() const

Returns true if the item is spanning all the columns in a row; otherwise returns false.

This function was introduced in Qt 4.3.

See also setFirstColumnSpanned().

Upstream PySide2 reference signatures (binding differences may apply):

isFirstColumnSpanned(self) -> bool

Source: https://doc.qt.io/archives/qt-5.15/qtreewidgetitem.html#isFirstColumnSpanned

isHidden

isHidden() -> bool

X.isHidden() -> bool

Supplemental documentation: Qt 5 reference:

bool QTreeWidgetItem::isHidden() const

Returns true if the item is hidden, otherwise returns false.

This function was introduced in Qt 4.2.

See also setHidden().

Upstream PySide2 reference signatures (binding differences may apply):

isHidden(self) -> bool

Source: https://doc.qt.io/archives/qt-5.15/qtreewidgetitem.html#isHidden

isSelected

isSelected() -> bool

X.isSelected() -> bool

Supplemental documentation: Qt 5 reference:

bool QTreeWidgetItem::isSelected() const

Returns true if the item is selected, otherwise returns false.

This function was introduced in Qt 4.2.

See also setSelected().

Upstream PySide2 reference signatures (binding differences may apply):

isSelected(self) -> bool

Source: https://doc.qt.io/archives/qt-5.15/qtreewidgetitem.html#isSelected

parent

parent() -> Any

X.parent() -> PythonQt.QtGui.QTreeWidgetItem

Supplemental documentation: Qt 5 reference:

QTreeWidgetItem *QTreeWidgetItem::parent() const

Returns the item's parent.

See also child().

Upstream PySide2 reference signatures (binding differences may apply):

parent(self) -> PySide2.QtWidgets.QTreeWidgetItem

Source: https://doc.qt.io/archives/qt-5.15/qtreewidgetitem.html#parent

read

read(*args: Any, **kwargs: Any) -> None

X.read(in)

Supplemental documentation: Qt 5 reference:

[virtual] void QTreeWidgetItem::read(QDataStream \&in)

Reads the item from stream in. This only reads data into a single item.

See also write().

Upstream PySide2 reference signatures (binding differences may apply):

read(self, in_: PySide2.QtCore.QDataStream) -> None

Source: https://doc.qt.io/archives/qt-5.15/qtreewidgetitem.html#read

removeChild

removeChild(child: Any) -> None

X.removeChild(child)

Supplemental documentation: Qt 5 reference:

void QTreeWidgetItem::removeChild(QTreeWidgetItem *child)

Removes the given item indicated by child. The removed item will not be deleted.

Upstream PySide2 reference signatures (binding differences may apply):

removeChild(self, child: PySide2.QtWidgets.QTreeWidgetItem) -> None

Source: https://doc.qt.io/archives/qt-5.15/qtreewidgetitem.html#removeChild

setBackground

setBackground(column: int, brush: Any) -> None

X.setBackground(column, brush)

Supplemental documentation: Qt 5 reference:

void QTreeWidgetItem::setBackground(int column, const QBrush \&brush)

Sets the background brush of the label in the given column to the specified brush. Setting a default-constructed brush will let the view use the default color from the style.

Note: If Qt Style Sheets are used on the same widget as setBackground(), style sheets will take precedence if the settings conflict.

This function was introduced in Qt 4.2.

See also background() and setForeground().

Upstream PySide2 reference signatures (binding differences may apply):

setBackground(self, column: int, brush: PySide2.QtGui.QBrush) -> None

Source: https://doc.qt.io/archives/qt-5.15/qtreewidgetitem.html#setBackground

setCheckState

setCheckState(column: int, state: Any) -> None

X.setCheckState(column, state)

Supplemental documentation: Qt 5 reference:

void QTreeWidgetItem::setCheckState(int column, Qt::CheckState state)

Sets the item in the given column check state to be state.

See also checkState().

Upstream PySide2 reference signatures (binding differences may apply):

setCheckState(self, column: int, state: PySide2.QtCore.Qt.CheckState) -> None

Source: https://doc.qt.io/archives/qt-5.15/qtreewidgetitem.html#setCheckState

setChildIndicatorPolicy

setChildIndicatorPolicy(policy: Any) -> None

X.setChildIndicatorPolicy(policy)

Supplemental documentation: Qt 5 reference:

void QTreeWidgetItem::setChildIndicatorPolicy(QTreeWidgetItem::ChildIndicatorPolicy policy)

Sets the item indicator policy. This policy decides when the tree branch expand/collapse indicator is shown. The default value is DontShowIndicatorWhenChildless.

See also childIndicatorPolicy().

Upstream PySide2 reference signatures (binding differences may apply):

setChildIndicatorPolicy(self, policy: PySide2.QtWidgets.QTreeWidgetItem.ChildIndicatorPolicy) -> None

Source: https://doc.qt.io/archives/qt-5.15/qtreewidgetitem.html#setChildIndicatorPolicy

setData

setData(column: int, role: int, value: Any) -> None

X.setData(column, role, value)

Supplemental documentation: Qt 5 reference:

[virtual] void QTreeWidgetItem::setData(int column, int role, const QVariant \&value)

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 Qt::ItemDataRole enum.

Note: The default implementation treats Qt::EditRole and Qt::DisplayRole as referring to the same data.

See also data().

Upstream PySide2 reference signatures (binding differences may apply):

setData(self, column: int, role: int, value: typing.Any) -> None

Source: https://doc.qt.io/archives/qt-5.15/qtreewidgetitem.html#setData

setDisabled

setDisabled(disabled: bool) -> None

X.setDisabled(disabled)

Supplemental documentation: Qt 5 reference:

void QTreeWidgetItem::setDisabled(bool disabled)

Disables the item if disabled is true; otherwise enables the item.

This function was introduced in Qt 4.3.

See also isDisabled() and setFlags().

Upstream PySide2 reference signatures (binding differences may apply):

setDisabled(self, disabled: bool) -> None

Source: https://doc.qt.io/archives/qt-5.15/qtreewidgetitem.html#setDisabled

setExpanded

setExpanded(expand: bool) -> None

X.setExpanded(expand)

Supplemental documentation: Qt 5 reference:

void QTreeWidgetItem::setExpanded(bool expand)

Expands the item if expand is true, otherwise collapses the item.

Warning: The QTreeWidgetItem must be added to the QTreeWidget before calling this function.

This function was introduced in Qt 4.2.

See also isExpanded().

Upstream PySide2 reference signatures (binding differences may apply):

setExpanded(self, expand: bool) -> None

Source: https://doc.qt.io/archives/qt-5.15/qtreewidgetitem.html#setExpanded

setFirstColumnSpanned

setFirstColumnSpanned(span: bool) -> None

X.setFirstColumnSpanned(span)

Supplemental documentation: Qt 5 reference:

void QTreeWidgetItem::setFirstColumnSpanned(bool span)

Sets the first section to span all columns if span is true; otherwise all item sections are shown.

This function was introduced in Qt 4.3.

See also isFirstColumnSpanned().

Upstream PySide2 reference signatures (binding differences may apply):

setFirstColumnSpanned(self, span: bool) -> None

Source: https://doc.qt.io/archives/qt-5.15/qtreewidgetitem.html#setFirstColumnSpanned

setFlags

setFlags(arg0: flags) -> None

X.setFlags(flags)

Supplemental documentation: Qt 5 reference:

void QTreeWidgetItem::setFlags(Qt::ItemFlags flags)

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.

See also flags().

Upstream PySide2 reference signatures (binding differences may apply):

setFlags(self, flags: PySide2.QtCore.Qt.ItemFlags) -> None

Source: https://doc.qt.io/archives/qt-5.15/qtreewidgetitem.html#setFlags

setFont

setFont(column: int, font: Any) -> None

X.setFont(column, font)

Supplemental documentation: Qt 5 reference:

void QTreeWidgetItem::setFont(int column, const QFont \&font)

Sets the font used to display the text in the given column to the given font.

See also font(), setText(), and setForeground().

Upstream PySide2 reference signatures (binding differences may apply):

setFont(self, column: int, font: PySide2.QtGui.QFont) -> None

Source: https://doc.qt.io/archives/qt-5.15/qtreewidgetitem.html#setFont

setForeground

setForeground(column: int, brush: Any) -> None

X.setForeground(column, brush)

Supplemental documentation: Qt 5 reference:

void QTreeWidgetItem::setForeground(int column, const QBrush \&brush)

Sets the foreground brush of the label in the given column to the specified brush.

This function was introduced in Qt 4.2.

See also foreground() and setBackground().

Upstream PySide2 reference signatures (binding differences may apply):

setForeground(self, column: int, brush: PySide2.QtGui.QBrush) -> None

Source: https://doc.qt.io/archives/qt-5.15/qtreewidgetitem.html#setForeground