QQmlFile Class
QQmlFileクラスは、URLを分類するための静的ユーティリティメソッドを提供します。詳細...
ヘッダ | #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 は、URL やファイル名からコンテンツを読み込む際にQQmlEngine と同じように分類するための、いくつかの静的ユーティリティメソッドを提供します。
メンバ関数のドキュメント
[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.