QGeoCodeReply Class

The QGeoCodeReply class manages an operation started by an instance of QGeoCodingManager. More...

Header: #include <QGeoCodeReply>
qmake: QT += location
Since: Qt 5.6
Inherits: QObject

This class was introduced in Qt 5.6.

Public Types

enum Error { NoError, EngineNotSetError, CommunicationError, ParseError, UnsupportedOptionError, …, UnknownError }

Detailed Description

Instances of QGeoCodeReply manage the state and results of these operations.

The isFinished(), error() and errorString() methods provide information on whether the operation has completed and if it completed successfully.

The finished() and error(QGeoCodeReply::Error,QString) signals can be used to monitor the progress of the operation.

It is possible that a newly created QGeoCodeReply may be in a finished state, most commonly because an error has occurred. Since such an instance will never emit the finished() or error(QGeoCodeReply::Error,QString) signals, it is important to check the result of isFinished() before making the connections to the signals. The documentation for QGeoCodingManager demonstrates how this might be carried out.

If the operation completes successfully the results will be able to be accessed with locations().

Member Type Documentation

enum QGeoCodeReply::Error

Describes an error which prevented the completion of the operation.

ConstantValueDescription
QGeoCodeReply::NoError0No error has occurred.
QGeoCodeReply::EngineNotSetError1The geocoding manager that was used did not have a QGeoCodingManagerEngine instance associated with it.
QGeoCodeReply::CommunicationError2An error occurred while communicating with the service provider.
QGeoCodeReply::ParseError3The response from the service provider was in an unrecognizable format.
QGeoCodeReply::UnsupportedOptionError4The requested operation or one of the options for the operation are not supported by the service provider.
QGeoCodeReply::CombinationError5An error occurred while results where being combined from multiple sources.
QGeoCodeReply::UnknownError6An error occurred which does not fit into any of the other categories.