QGeoRouteReply Class

The QGeoRouteReply class manages an operation started by an instance of QGeoRoutingManager. More...

Header: #include <QGeoRouteReply>
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 QGeoRouteReply 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(QGeoRouteReply::Error,QString) signals can be used to monitor the progress of the operation.

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

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

Member Type Documentation

enum QGeoRouteReply::Error

Describes an error which prevented the completion of the operation.

ConstantValueDescription
QGeoRouteReply::NoError0No error has occurred.
QGeoRouteReply::EngineNotSetError1The routing manager that was used did not have a QGeoRoutingManagerEngine instance associated with it.
QGeoRouteReply::CommunicationError2An error occurred while communicating with the service provider.
QGeoRouteReply::ParseError3The response from the service provider was in an unrecognizable format.
QGeoRouteReply::UnsupportedOptionError4The requested operation or one of the options for the operation are not supported by the service provider.
QGeoRouteReply::UnknownError5An error occurred which does not fit into any of the other categories.