QDeclarativeError

Synopsis

Functions

Detailed Description

The PySide.QtDeclarative.QDeclarativeError class encapsulates a QML error.

PySide.QtDeclarative.QDeclarativeError includes a textual description of the error, as well as location information (the file, line, and column). The PySide.QtDeclarative.QDeclarativeError.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"
           ^
class PySide.QtDeclarative.QDeclarativeError
class PySide.QtDeclarative.QDeclarativeError(arg__1)
Parameters:arg__1PySide.QtDeclarative.QDeclarativeError

Creates an empty error object.

Creates a copy of other .

PySide.QtDeclarative.QDeclarativeError.column()
Return type:PySide.QtCore.int

Returns the error column number.

PySide.QtDeclarative.QDeclarativeError.description()
Return type:unicode

Returns the error description.

PySide.QtDeclarative.QDeclarativeError.isValid()
Return type:PySide.QtCore.bool

Returns true if this error is valid, otherwise false.

PySide.QtDeclarative.QDeclarativeError.line()
Return type:PySide.QtCore.int

Returns the error line number.

PySide.QtDeclarative.QDeclarativeError.setColumn(arg__1)
Parameters:arg__1PySide.QtCore.int

Sets the error column number.

PySide.QtDeclarative.QDeclarativeError.setDescription(arg__1)
Parameters:arg__1 – unicode

Sets the error description .

PySide.QtDeclarative.QDeclarativeError.setLine(arg__1)
Parameters:arg__1PySide.QtCore.int

Sets the error line number.

PySide.QtDeclarative.QDeclarativeError.setUrl(arg__1)
Parameters:arg__1PySide.QtCore.QUrl

Sets the url for the file that caused this error.

PySide.QtDeclarative.QDeclarativeError.toString()
Return type:unicode

Returns the error as a human readable string.

PySide.QtDeclarative.QDeclarativeError.url()
Return type:PySide.QtCore.QUrl

Returns the url for the file that caused this error.