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: QgsLocatorFilter, displayString: str, userData: Any = None) Constructor for QgsLocatorResult.

QgsLocatorResult(QgsLocatorResult)

Methods

setUserData

Set userData for the locator result

Attributes

class ResultAction

Bases: sip.wrapper

Constructor for ResultAction

QgsLocatorResult.ResultAction(id: int, text: str, iconPath: 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(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