QQmlInfo Class
QQmlInfo 클래스를 사용하면 QML 관련 메시지를 로깅할 수 있습니다. 더 보기...
Header: | #include <QQmlInfo> |
CMake: | find_package(Qt6 REQUIRED COMPONENTS Qml) target_link_libraries(mytarget PRIVATE Qt6::Qml) |
qmake: | QT += qml |
상속합니다: | QDebug |
관련 비회원
QQmlInfo | qmlDebug(const QObject *object) |
QQmlInfo | qmlInfo(const QObject *object) |
QQmlInfo | qmlWarning(const QObject *object) |
상세 설명
QQmlInfo는 QML 관련 진단 메시지에 대한 불투명 핸들입니다. <<
연산자를 사용하여 메시지에 콘텐츠를 추가할 수 있습니다. QQmlInfo 객체가 소멸되면 컨텍스트에 대한 정보와 함께 결과 메시지를 인쇄합니다.
qmlDebug, qmlInfo, 및 qmlWarning 를참조하세요 .
관련 비회원
QQmlInfo qmlDebug(const QObject *object)
지정된 QML의 파일 및 줄 번호가 포함된 디버그 메시지를 출력합니다 object.
QML 유형이 로깅 메시지를 생성할 때 특정 인스턴스가 인스턴스화된 QML 파일과 줄 번호를 포함하면 추적성이 향상됩니다.
파일과 줄 번호를 포함하려면 객체를 전달해야 합니다. 해당 인스턴스에 대해 파일 및 줄 번호를 사용할 수 없는 경우(QML 엔진에 의해 인스턴스화되지 않았거나 위치 정보가 비활성화되어 있는 경우) "알 수 없는 위치"가 대신 사용됩니다.
예를 들어
qmlDebug(object) << "Internal state: 42";
prints
QML MyCustomType (unknown location): Internal state: 42
qmlInfo 및 qmlWarning 을참조하세요 .
QQmlInfo qmlInfo(const QObject *object)
지정된 QML의 파일 및 줄 번호가 포함된 정보 메시지를 인쇄합니다 object.
QML 유형이 로깅 메시지를 생성할 때 특정 인스턴스가 인스턴스화된 QML 파일과 줄 번호를 포함하면 추적성이 향상됩니다.
파일과 줄 번호를 포함하려면 객체를 전달해야 합니다. 해당 인스턴스에 대해 파일 및 줄 번호를 사용할 수 없는 경우(QML 엔진에 의해 인스턴스화되지 않았거나 위치 정보가 비활성화되어 있는 경우) "알 수 없는 위치"가 대신 사용됩니다.
예를 들어
qmlInfo(object) << tr("component property is a write-once property");
prints
QML MyCustomType (unknown location): component property is a write-once property
참고: Qt 5.9 이전 버전에서는 qmlInfo가 QtMsgType 경고를 사용하여 메시지를 보고했습니다. Qt 5.9 이상의 경우, qmlInfo는 QtMsgType 를 사용합니다. 경고를 보내려면 qmlWarning 를 사용합니다.
qmlDebug 와 qmlWarning도 참조하십시오 .
QQmlInfo qmlWarning(const QObject *object)
지정된 QML의 파일 및 줄 번호가 포함된 경고 메시지를 인쇄합니다 object.
QML 유형이 로깅 메시지를 생성할 때 특정 인스턴스가 인스턴스화된 QML 파일과 줄 번호를 포함하면 추적성이 향상됩니다.
파일과 줄 번호를 포함하려면 객체를 전달해야 합니다. 해당 인스턴스에 대해 파일 및 줄 번호를 사용할 수 없는 경우(QML 엔진에 의해 인스턴스화되지 않았거나 위치 정보가 비활성화되어 있는 경우) "알 수 없는 위치"가 대신 사용됩니다.
예를 들어
qmlInfo(object) << tr("property cannot be set to 0");
prints
QML MyCustomType (unknown location): property cannot be set to 0
© 2025 The Qt Company Ltd. Documentation contributions included herein are the copyrights of their respective owners. The documentation provided herein is licensed under the terms of the GNU Free Documentation License version 1.3 as published by the Free Software Foundation. Qt and respective logos are trademarks of The Qt Company Ltd. in Finland and/or other countries worldwide. All other trademarks are property of their respective owners.