class QPlaceAttribute

The QPlaceAttribute class represents generic attribute information about a place. More

Synopsis

Properties

  • labelᅟ - Localized label describing the attribute

  • textᅟ - Piece of rich text representing the attribute value

Methods

Note

This documentation may contain snippets that were automatically translated from C++ to Python. We always welcome contributions to the snippet translation. If you see an issue with the translation, you can also let us know by creating a ticket on https:/bugreports.qt.io/projects/PYSIDE

Detailed Description

A QPlaceAttribute instance stores an additional piece of information about a place that is not otherwise exposed through the QPlace class. A QPlaceAttribute encapsulates a localized label which describes the attribute and rich text string representing the attribute’s value. Generally, both are intended to be displayed to the end-user as is.

Some plugins may not support attributes at all, others may only support a certain set, others still may support a dynamically changing set of attributes over time or even allow attributes to be arbitrarily defined by the client application. The attributes could also vary on a place by place basis, for example one place may have opening hours while another does not. Consult the plugin references for details.

Attribute Types

The QPlaceAttribute class defines some constant strings which characterize standard attribute types.

There is a class of attribute types of the format x_id_<provider> for example x_id_here. This class of attributes is a set of alternative identifiers of the place, from the specified provider’s perspective.

The above types are used to access and modify attributes in QPlace via:

The attribute type is a string type so that providers are able to introduce new attributes as necessary. Custom attribute types should always be prefixed by a qualifier in order to avoid conflicts.

User Readable and Non-User Readable Attributes

Some attributes may not be intended to be readable by end users, the label field of such attributes are empty to indicate this fact.

Note

Properties can be used directly when from __feature__ import true_property is used or via accessor functions otherwise.

property labelᅟ: str

This property holds a localized label describing the attribute..

Access functions:
property textᅟ: str

This property holds a piece of rich text representing the attribute value..

Access functions:
PySide6.QtLocation.QPlaceAttribute.OpeningHours
PySide6.QtLocation.QPlaceAttribute.Payment
PySide6.QtLocation.QPlaceAttribute.Provider
__init__()

Constructs an attribute.

__init__(other)
Parameters:

otherQPlaceAttribute

Creates a copy of other.

isEmpty()
Return type:

bool

Returns a boolean indicating whether the all the fields of the place attribute are empty or not.

label()
Return type:

str

See also

setLabel()

Getter of property labelᅟ .

__ne__(rhs)
Parameters:

rhsQPlaceAttribute

Return type:

bool

Returns true if lhs is not equal to rhs, otherwise returns false.

__eq__(rhs)
Parameters:

rhsQPlaceAttribute

Return type:

bool

Returns true if lhs is equal to rhs, otherwise returns false.

setLabel(label)
Parameters:

label – str

See also

label()

Setter of property labelᅟ .

setText(text)
Parameters:

text – str

See also

text()

Setter of property textᅟ .

swap(other)
Parameters:

otherQPlaceAttribute

text()
Return type:

str

See also

setText()

Getter of property textᅟ .