QtQml Namespace▲
-
Header: QtQml
-
qmake: QT += qml
Detailed Description▲
Function Documentation▲
[since 5.9] QQmlInfo qmlDebug(const QObject *object)▲
Prints debug messages that include the file and line number for the specified QML object.
When QML types produce logging messages, it improves traceability if they include the QML file and line number on which the particular instance was instantiated.
To include the file and line number, an object must be passed. If the file and line number is not available for that instance (either it was not instantiated by the QML engine or location information is disabled), "unknown location" will be used instead. For example,
qmlDebug(object) << "Internal state: 42";prints
QML MyCustomType (unknown location): Internal state: 42This function was introduced in Qt 5.9.
See Also▲
See also QtQml::qmlInfo, QtQml::qmlWarning
QQmlInfo qmlInfo(const QObject *object)▲
Prints informational messages that include the file and line number for the specified QML object.
When QML types produce logging messages, it improves traceability if they include the QML file and line number on which the particular instance was instantiated.
To include the file and line number, an object must be passed. If the file and line number is not available for that instance (either it was not instantiated by the QML engine or location information is disabled), "unknown location" will be used instead.
For example,
qmlInfo(object) << tr("component property is a write-once property");prints
QML MyCustomType (unknown location): component property is a write-once propertyIn versions prior to Qt 5.9, qmlInfo reported messages using a warning https://. For Qt 5.9 and above, qmlInfo uses an info https://. To send warnings, use https://.
See Also▲
See also QtQml::qmlDebug, QtQml::qmlWarning
[since 5.9] QQmlInfo qmlWarning(const QObject *object)▲
Prints warning messages that include the file and line number for the specified QML object.
When QML types produce logging messages, it improves traceability if they include the QML file and line number on which the particular instance was instantiated.
To include the file and line number, an object must be passed. If the file and line number is not available for that instance (either it was not instantiated by the QML engine or location information is disabled), "unknown location" will be used instead.
For example,
qmlInfo(object) << tr("property cannot be set to 0");prints
QML MyCustomType (unknown location): property cannot be set to 0This function was introduced in Qt 5.9.
See Also▲
See also QtQml::qmlDebug, QtQml::qmlInfo


