Skip to content

PythonQt.QtGui.QListWidgetItem · declarations 001

Back to PythonQt.QtGui.QListWidgetItem

ItemType instance-attribute

ItemType: 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

background

background() -> Any

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

Supplemental documentation: Qt 5 reference:

QBrush QListWidgetItem::background() const

Returns the brush used to display the list item's background.

This function was introduced in Qt 4.2.

See also setBackground() and foreground().

Upstream PySide2 reference signatures (binding differences may apply):

background(self) -> PySide2.QtGui.QBrush

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

checkState

checkState() -> Any

X.checkState()

Supplemental documentation: Qt 5 reference:

Qt::CheckState QListWidgetItem::checkState() const

Returns the checked state of the list item (see Qt::CheckState).

See also setCheckState() and flags().

Upstream PySide2 reference signatures (binding differences may apply):

checkState(self) -> PySide2.QtCore.Qt.CheckState

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

clone

clone() -> Any

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

Supplemental documentation: Qt 5 reference:

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

Creates an exact copy of the item.

Upstream PySide2 reference signatures (binding differences may apply):

clone(self) -> PySide2.QtWidgets.QListWidgetItem

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

data

data(role: int) -> Any

X.data(role) -> object

Supplemental documentation: Qt 5 reference:

[virtual] QVariant QListWidgetItem::data(int role) const

Returns the item's data for a given role. Reimplement this function if you need extra roles or special behavior for certain roles.

See also Qt::ItemDataRole and setData().

Upstream PySide2 reference signatures (binding differences may apply):

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

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

flags

flags() -> Any

X.flags()

Supplemental documentation: Qt 5 reference:

Qt::ItemFlags QListWidgetItem::flags() const

Returns the item flags for this item (see Qt::ItemFlags).

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/qlistwidgetitem.html#flags

font

font() -> Any

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

Supplemental documentation: Qt 5 reference:

QFont QListWidgetItem::font() const

Returns the font used to display this list item's text.

See also setFont().

Upstream PySide2 reference signatures (binding differences may apply):

font(self) -> PySide2.QtGui.QFont

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

foreground

foreground() -> Any

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

Supplemental documentation: Qt 5 reference:

QBrush QListWidgetItem::foreground() const

Returns the brush used to display the list item's foreground (e.g. text).

This function was introduced in Qt 4.2.

See also setForeground() and background().

Upstream PySide2 reference signatures (binding differences may apply):

foreground(self) -> PySide2.QtGui.QBrush

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

icon

icon() -> Any

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

Supplemental documentation: Qt 5 reference:

QIcon QListWidgetItem::icon() const

Returns the list item's icon.

See also setIcon() and iconSize.

Upstream PySide2 reference signatures (binding differences may apply):

icon(self) -> PySide2.QtGui.QIcon

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

isHidden

isHidden() -> bool

X.isHidden() -> bool

Supplemental documentation: Qt 5 reference:

bool QListWidgetItem::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/qlistwidgetitem.html#isHidden

isSelected

isSelected() -> bool

X.isSelected() -> bool

Supplemental documentation: Qt 5 reference:

bool QListWidgetItem::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/qlistwidgetitem.html#isSelected

listWidget

listWidget() -> Any

X.listWidget() -> PythonQt.QtGui.QListWidget

Supplemental documentation: Qt 5 reference:

QListWidget *QListWidgetItem::listWidget() const

Returns the list widget containing the item.

Upstream PySide2 reference signatures (binding differences may apply):

listWidget(self) -> PySide2.QtWidgets.QListWidget

Source: https://doc.qt.io/archives/qt-5.15/qlistwidgetitem.html#listWidget

read

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

X.read(in)

Supplemental documentation: Qt 5 reference:

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

Reads the item from stream in.

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/qlistwidgetitem.html#read

setBackground

setBackground(brush: Any) -> None

X.setBackground(brush)

Supplemental documentation: Qt 5 reference:

void QListWidgetItem::setBackground(const QBrush \&brush)

Sets the background brush of the list item to the given brush. 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 background() and setForeground().

Upstream PySide2 reference signatures (binding differences may apply):

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

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

setCheckState

setCheckState(state: Any) -> None

X.setCheckState(state)

Supplemental documentation: Qt 5 reference:

void QListWidgetItem::setCheckState(Qt::CheckState state)

Sets the check state of the list item to state.

See also checkState().

Upstream PySide2 reference signatures (binding differences may apply):

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

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

setData

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

X.setData(role, value)

Supplemental documentation: Qt 5 reference:

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

Sets the data for a given role to the given value. Reimplement this function if you need extra roles or special behavior for certain roles.

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

See also Qt::ItemDataRole and data().

Upstream PySide2 reference signatures (binding differences may apply):

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

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

setFlags

setFlags(arg0: flags) -> None

X.setFlags(flags)

Supplemental documentation: Qt 5 reference:

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

Sets the item flags for the list item to flags.

See also flags() and Qt::ItemFlags.

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/qlistwidgetitem.html#setFlags

setFont

setFont(font: Any) -> None

X.setFont(font)

Supplemental documentation: Qt 5 reference:

void QListWidgetItem::setFont(const QFont \&font)

Sets the font used when painting the item to the given font.

See also font().

Upstream PySide2 reference signatures (binding differences may apply):

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

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

setForeground

setForeground(brush: Any) -> None

X.setForeground(brush)

Supplemental documentation: Qt 5 reference:

void QListWidgetItem::setForeground(const QBrush \&brush)

Sets the foreground brush of the list item to the given brush. 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 foreground() and setBackground().

Upstream PySide2 reference signatures (binding differences may apply):

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

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

setHidden

setHidden(hide: bool) -> None

X.setHidden(hide)

Supplemental documentation: Qt 5 reference:

void QListWidgetItem::setHidden(bool hide)

Hides the item if hide is true; otherwise shows the item.

This function was introduced in Qt 4.2.

See also isHidden().

Upstream PySide2 reference signatures (binding differences may apply):

setHidden(self, hide: bool) -> None

Source: https://doc.qt.io/archives/qt-5.15/qlistwidgetitem.html#setHidden

setIcon

setIcon(icon: Any) -> None

X.setIcon(icon)

Supplemental documentation: Qt 5 reference:

void QListWidgetItem::setIcon(const QIcon \&icon)

Sets the icon for the list item to the given icon.

See also icon(), text(), and iconSize.

Upstream PySide2 reference signatures (binding differences may apply):

setIcon(self, icon: PySide2.QtGui.QIcon) -> None

Source: https://doc.qt.io/archives/qt-5.15/qlistwidgetitem.html#setIcon

setSelected

setSelected(select: bool) -> None

X.setSelected(select)

Supplemental documentation: Qt 5 reference:

void QListWidgetItem::setSelected(bool select)

Sets the selected state of the item to select.

This function was introduced in Qt 4.2.

See also isSelected().

Upstream PySide2 reference signatures (binding differences may apply):

setSelected(self, select: bool) -> None

Source: https://doc.qt.io/archives/qt-5.15/qlistwidgetitem.html#setSelected

setSizeHint

setSizeHint(size: Any) -> None

X.setSizeHint(size)

Supplemental documentation: Qt 5 reference:

void QListWidgetItem::setSizeHint(const QSize \&size)

Sets the size hint for the list item to be size. If no size hint is set or size is invalid, the item delegate will compute the size hint based on the item data.

This function was introduced in Qt 4.1.

See also sizeHint().

Upstream PySide2 reference signatures (binding differences may apply):

setSizeHint(self, size: PySide2.QtCore.QSize) -> None

Source: https://doc.qt.io/archives/qt-5.15/qlistwidgetitem.html#setSizeHint

setStatusTip

setStatusTip(statusTip: str) -> None

X.setStatusTip(statusTip)

Supplemental documentation: Qt 5 reference:

void QListWidgetItem::setStatusTip(const QString \&statusTip)

Sets the status tip for the list item to the text specified by statusTip. QListWidget mouseTracking needs to be enabled for this feature to work.

See also statusTip(), setToolTip(), setWhatsThis(), and QWidget::setMouseTracking().

Upstream PySide2 reference signatures (binding differences may apply):

setStatusTip(self, statusTip: str) -> None

Source: https://doc.qt.io/archives/qt-5.15/qlistwidgetitem.html#setStatusTip

setText

setText(text: str) -> None

X.setText(text)

Supplemental documentation: Qt 5 reference:

void QListWidgetItem::setText(const QString \&text)

Sets the text for the list widget item's to the given text.

See also text().

Upstream PySide2 reference signatures (binding differences may apply):

setText(self, text: str) -> None

Source: https://doc.qt.io/archives/qt-5.15/qlistwidgetitem.html#setText

setTextAlignment

setTextAlignment(alignment: int) -> None

X.setTextAlignment(alignment)

Supplemental documentation: Qt 5 reference:

void QListWidgetItem::setTextAlignment(int alignment)

Sets the list item's text alignment to alignment.

See also textAlignment() and Qt::AlignmentFlag.

Upstream PySide2 reference signatures (binding differences may apply):

setTextAlignment(self, alignment: int) -> None

Source: https://doc.qt.io/archives/qt-5.15/qlistwidgetitem.html#setTextAlignment

setToolTip

setToolTip(toolTip: str) -> None

X.setToolTip(toolTip)

Supplemental documentation: Qt 5 reference:

void QListWidgetItem::setToolTip(const QString \&toolTip)

Sets the tooltip for the list item to the text specified by toolTip.

See also toolTip(), setStatusTip(), and setWhatsThis().

Upstream PySide2 reference signatures (binding differences may apply):

setToolTip(self, toolTip: str) -> None

Source: https://doc.qt.io/archives/qt-5.15/qlistwidgetitem.html#setToolTip

setWhatsThis

setWhatsThis(whatsThis: str) -> None

X.setWhatsThis(whatsThis)

Supplemental documentation: Qt 5 reference:

void QListWidgetItem::setWhatsThis(const QString \&whatsThis)

Sets the "What's This?" help for the list item to the text specified by whatsThis.

See also whatsThis(), setStatusTip(), and setToolTip().

Upstream PySide2 reference signatures (binding differences may apply):

setWhatsThis(self, whatsThis: str) -> None

Source: https://doc.qt.io/archives/qt-5.15/qlistwidgetitem.html#setWhatsThis

sizeHint

sizeHint() -> Any

X.sizeHint() -> PythonQt.QtCore.QSize

Supplemental documentation: Qt 5 reference:

QSize QListWidgetItem::sizeHint() const

Returns the size hint set for the list item.

This function was introduced in Qt 4.1.

See also setSizeHint().

Upstream PySide2 reference signatures (binding differences may apply):

sizeHint(self) -> PySide2.QtCore.QSize

Source: https://doc.qt.io/archives/qt-5.15/qlistwidgetitem.html#sizeHint

statusTip

statusTip() -> str

X.statusTip() -> str

Supplemental documentation: Qt 5 reference:

QString QListWidgetItem::statusTip() const

Returns the list item's status tip.

See also setStatusTip().

Upstream PySide2 reference signatures (binding differences may apply):

statusTip(self) -> str

Source: https://doc.qt.io/archives/qt-5.15/qlistwidgetitem.html#statusTip

text

text() -> str

X.text() -> str

Supplemental documentation: Qt 5 reference:

QString QListWidgetItem::text() const

Returns the list item's text.

See also setText().

Upstream PySide2 reference signatures (binding differences may apply):

text(self) -> str

Source: https://doc.qt.io/archives/qt-5.15/qlistwidgetitem.html#text

textAlignment

textAlignment() -> int

X.textAlignment() -> int

Supplemental documentation: Qt 5 reference:

int QListWidgetItem::textAlignment() const

Returns the text alignment for the list item.

See also setTextAlignment() and Qt::AlignmentFlag.

Upstream PySide2 reference signatures (binding differences may apply):

textAlignment(self) -> int

Source: https://doc.qt.io/archives/qt-5.15/qlistwidgetitem.html#textAlignment

toolTip

toolTip() -> str

X.toolTip() -> str

Supplemental documentation: Qt 5 reference:

QString QListWidgetItem::toolTip() const

Returns the list item's tooltip.

See also setToolTip(), statusTip(), and whatsThis().

Upstream PySide2 reference signatures (binding differences may apply):

toolTip(self) -> str

Source: https://doc.qt.io/archives/qt-5.15/qlistwidgetitem.html#toolTip

type

type() -> int

X.type() -> int

Supplemental documentation: Qt 5 reference:

int QListWidgetItem::type() const

Returns the type passed to the QListWidgetItem constructor.

Upstream PySide2 reference signatures (binding differences may apply):

type(self) -> int

Source: https://doc.qt.io/archives/qt-5.15/qlistwidgetitem.html#type

whatsThis

whatsThis() -> str

X.whatsThis() -> str

Supplemental documentation: Qt 5 reference:

QString QListWidgetItem::whatsThis() const

Returns the list item's "What's This?" help text.

See also setWhatsThis(), statusTip(), and toolTip().

Upstream PySide2 reference signatures (binding differences may apply):

whatsThis(self) -> str

Source: https://doc.qt.io/archives/qt-5.15/qlistwidgetitem.html#whatsThis

write

write(out: Any) -> None

X.write(out)

Supplemental documentation: Qt 5 reference:

[virtual] void QListWidgetItem::write(QDataStream \&out) const

Writes the item to stream out.

See also read().

Upstream PySide2 reference signatures (binding differences may apply):

write(self, out: PySide2.QtCore.QDataStream) -> None

Source: https://doc.qt.io/archives/qt-5.15/qlistwidgetitem.html#write