Class: QgsLocatorResult

class qgis.core.QgsLocatorResult

Bases: sip.wrapper

Encapsulates properties of an individual matching result found by a QgsLocatorFilter.

QgsLocatorResult() Constructor for QgsLocatorResult.

QgsLocatorResult(filter: Optional[QgsLocatorFilter], displayString: Optional[str], userData: Any = None) Constructor for QgsLocatorResult.

QgsLocatorResult(a0: QgsLocatorResult)

Methods

setUserData

Set userData for the locator result

Attributes

class ResultAction

Bases: sip.wrapper

Constructor for ResultAction

QgsLocatorResult.ResultAction(id: int, text: Optional[str], iconPath: Optional[str] = ‘’) Constructor for ResultAction The id used to recognized the action when the result is triggered. It should be 0 or greater as otherwise, the result will be triggered normally.

QgsLocatorResult.ResultAction(a0: QgsLocatorResult.ResultAction)

iconPath
id
text
actions
description
displayString
filter
group
icon
score
setUserData(self, userData: Any)

Set userData for the locator result

Added in version 3.34.

Parameters:

userData (Any)

property userData

_userData(self) -> Any Returns the userData.

Added in version 3.18.

Return type:

Any