Class: QgsExpressionItem

class qgis.gui.QgsExpressionItem

Bases: PyQt5.QtGui.QStandardItem

An expression item that can be used in the QgsExpressionBuilderWidget tree.

Methods

emitDataChanged

getExpressionText

rtype:

str

getHelpText

Gets the help text that is associated with this expression item.

getItemType

Gets the type of expression item, e.g., header, field, ExpressionNode.

setHelpText

Set the help text for the current item

Attributes

CUSTOM_SORT_ROLE

ExpressionNode

Field

Header

ITEM_NAME_ROLE

ITEM_TYPE_ROLE

LAYER_ID_ROLE

SEARCH_TAGS_ROLE

CUSTOM_SORT_ROLE = 257
ExpressionNode = 2
Field = 1
Header = 0
ITEM_NAME_ROLE = 260
ITEM_TYPE_ROLE = 258
class ItemType

Bases: int

LAYER_ID_ROLE = 261
SEARCH_TAGS_ROLE = 259
emitDataChanged(self)
getExpressionText(self) str
Return type:

str

getHelpText(self) str

Gets the help text that is associated with this expression item.

Return type:

str

Returns:

The help text.

getItemType(self) QgsExpressionItem.ItemType

Gets the type of expression item, e.g., header, field, ExpressionNode.

Return type:

QgsExpressionItem.ItemType

Returns:

The QgsExpressionItem.ItemType

setHelpText(self, helpText: str | None)

Set the help text for the current item

Note

The help text can be set as a html string.

Parameters:

helpText (Optional[str])