[][src]Function qt_qml::qt_qml::qml_warning_q_object

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

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

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

C++ documentation:

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 0

This function was introduced in Qt 5.9.

See also QtQml::qmlDebug and QtQml::qmlInfo.