Class: QgsDetailedItemData

The data only representation of a QgsDetailedItemWidget, designed to be used in custom views.

class qgis.gui.QgsDetailedItemData[source]

Bases: object

category(self) str[source]

Returns the item’s category.

See also

setCategory()

Return type:

str

detail(self) str[source]

Returns the detailed description for the item.

See also

setDetail()

Return type:

str

icon(self) QPixmap[source]

Returns the item’s icon.

See also

setIcon()

Return type:

QPixmap

isCheckable(self) bool[source]

Returns True if the item is checkable.

See also

setCheckable()

Return type:

bool

isChecked(self) bool[source]

Returns True if the item is checked.

See also

setChecked()

Return type:

bool

isEnabled(self) bool[source]

Returns True if the item is enabled.

See also

setEnabled()

Return type:

bool

isRenderedAsWidget(self) bool[source]

Returns True if the item will be rendered using a widget.

Return type:

bool

setCategory(self, category: str | None)[source]

Sets the item’s category.

See also

category()

Parameters:

category (Optional[str])

setCheckable(self, flag: bool)[source]

Sets whether the item is checkable.

See also

isCheckable()

Parameters:

flag (bool)

setChecked(self, flag: bool)[source]

Sets whether the item is checked.

See also

isChecked()

Parameters:

flag (bool)

setDetail(self, detail: str | None)[source]

Sets the detailed description for the item.

See also

detail()

Parameters:

detail (Optional[str])

setEnabled(self, flag: bool)[source]

Sets whether the item is enabled.

See also

isEnabled()

Parameters:

flag (bool)

setIcon(self, icon: QPixmap)[source]

Sets the item’s icon.

See also

icon()

Parameters:

icon (QPixmap)

setRenderAsWidget(self, flag: bool)[source]

This is a hint to the delegate to render using a widget rather than manually painting every part of the list item.

Note

the delegate may completely ignore this depending on the delegate implementation.

Parameters:

flag (bool)

setTitle(self, title: str | None)[source]

Sets the title for the item.

See also

title()

Parameters:

title (Optional[str])

title(self) str[source]

Returns the item’s title.

See also

setTitle()

Return type:

str