Obsolete Members for QQmlEngine
クラスQQmlEngine の以下のメンバは非推奨である。これらは古いソース・コードの動作を維持するために提供されています。新しいコードでは使用しないことを強くお勧めします。
パブリック関数
(deprecated in 6.4) bool | importPlugin(const QString &filePath, const QString &uri, QList<QQmlError> *errors) |
メンバ関数ドキュメント
[deprecated in 6.4]
bool QQmlEngine::importPlugin(const QString &filePath, const QString &uri, QList<QQmlError> *errors)
この関数は6.4から非推奨となった。新しいコードでこの関数を使用しないことを強くお勧めします。
代わりに "import "文でQMLからモジュールをインポートしてください。
uri で指定されたfilePath というプラグインをインポートします。プラグインのインポートに成功した場合はtrueを返し、失敗した場合はfalseを返します。
失敗した場合、そしてnullでない場合、errors のリストの前にエラーが追加されます。
プラグインは、QQmlEngineExtensionPlugin インターフェースを実装した Qt プラグインでなければなりません。
注意: このようにプラグインを直接読み込むと、モジュールのインポートロジックが混乱します。インポートロジックが特定の場所からプラグインをロードするようにするには、addPluginPath() を使用します。各プラグインは、"import "ステートメントを使ってインポートできるQMLモジュールの一部でなければなりません。
© 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.