QML 전역 객체
QML 자바스크립트 호스트 환경은 다음과 같은 호스트 객체와 함수를 구현합니다. 이들은 내장되어 있으므로, 별도의 임포트 없이 QML에 로드된 모든 자바스크립트 코드에서 사용할 수 있습니다:
- Qt object: QML 환경에 특화된 헬퍼 메서드와 속성을 제공하는 QML 객체입니다.
- qsTr(), qsTranslate(), qsTrId(), QT_TR_NOOP()(), QT_TRANSLATE_NOOP(), QT_TRID_NOOP() 함수: QML 환경에서 문자열과 문자열 리터럴을 변환할 수 있게 해주는 QML 함수입니다.
- gc() 함수: 가비지 컬렉션을 수동으로 트리거하는 QML 함수입니다.
- print() 함수: 콘솔에 출력을 표시하는 QML 함수입니다.
- 콘솔 객체: FireBug 콘솔 API의 하위 집합을 구현합니다.
- XMLHttpRequest, DOMException: W3C XMLHttpRequest 사양의 일부를 구현합니다.
참고: globalObject() 함수를 사용하여 QQmlEngine 의 전역 객체를 변경할수는 없습니다. 자세한 내용은 JavaScript 환경 제한 사항을 참조하십시오.
© 2026 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.