QPlaceSearchResult¶
The
QPlaceSearchResult
class is the base class for search results. More…
Inherited by: QPlaceProposedSearchResult, QPlaceResult
Synopsis¶
Functions¶
Detailed Description¶
A list of search results can be retrieved from the
QPlaceSearchReply
after it has successfully completed the request. Common to all search results are thetitle
andicon
, which can be used to present the search result to the user.The intended usage is that depending on the
type
, the search result can be converted to a more detailed subclass like so:if (result.type() == QPlaceSearchResult::PlaceResult) { QPlaceResult placeResult = result; qDebug() << placeResult.place().name(); qDebug() << placeResult.place().location().coordinate(); qDebug() << placeResult.distance(); }The implementation is handled in such a way that object slicing is not an issue. It is not expected that client applications or backend plugins instantiate a
QPlaceSearchResult
directly, but rather client applications simply convert to search result subclasses and backend plugins only instantiate subclasses.See also
- class PySide2.QtLocation.QPlaceSearchResult¶
PySide2.QtLocation.QPlaceSearchResult(other)
- param other:
Constructs a new search result.
Constructs a copy of
other
- PySide2.QtLocation.QPlaceSearchResult.SearchResultType¶
Defines the type of search result
Constant
Description
QPlaceSearchResult.UnknownSearchResult
The contents of the search result are unknown.
QPlaceSearchResult.PlaceResult
The search result contains a place.
QPlaceSearchResult.ProposedSearchResult
The search result contains a proposed search which may be relevant.
- PySide2.QtLocation.QPlaceSearchResult.icon()¶
- Return type:
Returns an icon that can be used to represent the search result.
See also
- PySide2.QtLocation.QPlaceSearchResult.__ne__(other)¶
- Parameters:
- Return type:
bool
Returns true if
other
not equal to this search result, otherwise returns false.
- PySide2.QtLocation.QPlaceSearchResult.__eq__(other)¶
- Parameters:
- Return type:
bool
Returns true if
other
is equal to this search result, otherwise returns false.
- PySide2.QtLocation.QPlaceSearchResult.setIcon(icon)¶
- Parameters:
Sets the icon of the search result to
icon
.See also
- PySide2.QtLocation.QPlaceSearchResult.setTitle(title)¶
- Parameters:
title – str
Sets the title of the search result to
title
.See also
- PySide2.QtLocation.QPlaceSearchResult.title()¶
- Return type:
str
Returns the title of the search result. This string can be used to display the search result to the user.
See also
- PySide2.QtLocation.QPlaceSearchResult.type()¶
- Return type:
Returns the result type.
© 2022 The Qt Company Ltd. Documentation contributions included herein are the copyrights of their respective owners. The documentation provided herein is licensed under the terms of the GNU Free Documentation License version 1.3 as published by the Free Software Foundation. Qt and respective logos are trademarks of The Qt Company Ltd. in Finland and/or other countries worldwide. All other trademarks are property of their respective owners.