QPlaceResult Class
The QPlaceResult class represents a search result containing a place. More...
| Header: | #include <QPlaceResult> |
| qmake: | QT += location |
| Since: | Qt 5.6 |
| Inherits: | QPlaceSearchResult |
This class was introduced in Qt 5.6.
Detailed Description
The PlaceResult holds the distance to the place from the center of the search request, an instance of the place and an indication of whether the result is sponsored or organic.
The intended usage is that a QPlaceSearchResult can be converted into a QPlaceResult 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.
See also QPlaceSearchResult.