QDeclarativeError Class ReferenceThe QDeclarativeError class encapsulates a QML error. Далее... #include <QDeclarativeError> Этот класс был введён в Qt 4.7. Открытые функции
Связанные нечлены класса
Подробное описаниеThe QDeclarativeError class encapsulates a QML error. QDeclarativeError includes a textual description of the error, as well as location information (the file, line, and column). The toString() 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 expected
You can use qDebug() or qWarning() 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 also QDeclarativeView::errors() and QDeclarativeComponent::errors(). Описание функций-членовQDeclarativeError::QDeclarativeError ()Creates an empty error object. QDeclarativeError::QDeclarativeError ( const QDeclarativeError & other )Создаёт копию other. int QDeclarativeError::column () constReturns the error column number. See also setColumn(). QString QDeclarativeError::description () constReturns the error description. Смотрите также setDescription(). bool QDeclarativeError::isValid () constReturns true if this error is valid, otherwise false. int QDeclarativeError::line () constReturns the error line number. Смотрите также setLine(). void QDeclarativeError::setColumn ( int column )Sets the error column number. See also column(). void QDeclarativeError::setDescription ( const QString & description )Sets the error description. Смотрите также description(). void QDeclarativeError::setLine ( int line )Sets the error line number. Смотрите также line(). void QDeclarativeError::setUrl ( const QUrl & url )Sets the url for the file that caused this error. See also url(). QString QDeclarativeError::toString () constReturns the error as a human readable string. QUrl QDeclarativeError::url () constReturns the url for the file that caused this error. See also setUrl(). QDeclarativeError & QDeclarativeError::operator= ( const QDeclarativeError & other )Assigns other to this error object. Связанные нечлены классаQDebug operator<< ( QDebug debug, const QDeclarativeError & error )Outputs a human readable version of error to debug. |
Попытка перевода Qt документации. Если есть желание присоединиться, или если есть замечания или пожелания, то заходите на форум: Перевод Qt документации на русский язык... Люди внесшие вклад в перевод: Команда переводчиков |