QQmlFile Class
QQmlFile 클래스는 URL을 분류하는 정적 유틸리티 메서드를 제공합니다. 더 보기...
Header: | #include <QQmlFile> |
CMake: | find_package(Qt6 REQUIRED COMPONENTS Qml) target_link_libraries(mytarget PRIVATE Qt6::Qml) |
qmake: | QT += qml |
정적 공개 멤버
bool | isLocalFile(const QString &url) |
bool | isLocalFile(const QUrl &url) |
QString | urlToLocalFileOrQrc(const QString &url) |
QString | urlToLocalFileOrQrc(const QUrl &url) |
자세한 설명
QQmlFile은 콘텐츠를 로드할 때 QQmlEngine 에서와 같은 방식으로 URL과 파일 이름을 분류하는 몇 가지 정적 유틸리티 메서드를 제공합니다.
멤버 함수 문서
[static]
bool QQmlFile::isLocalFile(const QString &url)
url 이 QFile 로 열 수 있는 로컬 파일인 경우 true
을 반환합니다. 그렇지 않으면 false
을 반환합니다. 로컬 파일 URL에는 qrc:
또는 file:
스키마가 있습니다.
참고: Android에서는 assets:
또는 content:
스키마를 가진 URL도 로컬 파일로 간주됩니다.
[static]
bool QQmlFile::isLocalFile(const QUrl &url)
url 이 QFile 로 열 수 있는 로컬 파일인 경우 true
을 반환합니다. 그렇지 않으면 false
을 반환합니다. 로컬 파일 URL에는 qrc:
또는 file:
스키마가 있습니다.
참고: Android에서는 assets:
또는 content:
스키마를 가진 URL도 로컬 파일로 간주됩니다.
[static]
QString QQmlFile::urlToLocalFileOrQrc(const QString &url)
url 이 로컬 파일인 경우 QFile 으로 전달하기에 적합한 경로를 반환합니다. 그렇지 않으면 빈 문자열을 반환합니다.
isLocalFile도 참조하세요 .
[static]
QString QQmlFile::urlToLocalFileOrQrc(const QUrl &url)
url 이 로컬 파일인 경우 QFile 으로 전달하기에 적합한 경로를 반환합니다. 그렇지 않으면 빈 문자열을 반환합니다.
isLocalFile도 참조하세요 .
© 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.