[][src]Function qt_qml::qt_qml::qml_info_q_object

pub unsafe fn qml_info_q_object(
    me: impl CastInto<Ptr<QObject>>
) -> CppBox<QQmlInfo>

Prints informational messages that include the file and line number for the specified QML object.

Calls C++ function: QQmlInfo QtQml::qmlInfo(const QObject* me).

C++ documentation:

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 property

Note: In versions prior to Qt 5.9, qmlInfo reported messages using a warning QtMsgType. For Qt 5.9 and above, qmlInfo uses an info QtMsgType. To send warnings, use qmlWarning.

See also QtQml::qmlDebug and QtQml::qmlWarning.