
We bake cookies in your browser for a better experience. Using this site means that you consent.Read More
TheQDeclarativeError class encapsulates a QML error.More...
| Header: | #include <QDeclarativeError> |
| Since: | Qt 4.7 |
| QDeclarativeError() | |
| QDeclarativeError(const QDeclarativeError & other) | |
| int | column() const |
| QString | description() const |
| bool | isValid() const |
| int | line() const |
| void | setColumn(int column) |
| void | setDescription(const QString & description) |
| void | setLine(int line) |
| void | setUrl(const QUrl & url) |
| QString | toString() const |
| QUrl | url() const |
| QDeclarativeError & | operator=(const QDeclarativeError & other) |
| QDebug | operator<<(QDebug debug, const QDeclarativeError & error) |
TheQDeclarativeError class encapsulates a QML error.
QDeclarativeError includes a textual description of the error, as well as location information (the file, line, and column). ThetoString() method creates a single-line, human-readable string containing all of this information, for example:
file:///home/user/test.qml:7:8: Invalid property assignment: double expectedYou can useqDebug() orqWarning() to output errors to the console. This method will attempt to open the file indicated by the error and include additional contextual information.
file:///home/user/test.qml:7:8: Invalid property assignment: double expected y:"hello"^
See alsoQDeclarativeView::errors() andQDeclarativeComponent::errors().
Creates an empty error object.
Creates a copy ofother.
Returns the error column number.
See alsosetColumn().
Returns the error description.
See alsosetDescription().
Returns true if this error is valid, otherwise false.
Returns the error line number.
See alsosetLine().
Sets the errorcolumn number.
See alsocolumn().
Sets the errordescription.
See alsodescription().
Sets the errorline number.
See alsoline().
Sets theurl for the file that caused this error.
See alsourl().
Returns the error as a human readable string.
Returns the url for the file that caused this error.
See alsosetUrl().
Assignsother to this error object.
Outputs a human readable version oferror todebug.
© 2016 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 theGNU 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.