Obsolete Members for QQmlExtensionPlugin

The following members of class QQmlExtensionPlugin are deprecated. They are provided to keep old source code working. We strongly advise against using them in new code.

Public Functions

(deprecated in 6.3) QUrl baseUrl() const

Member Function Documentation

[deprecated in 6.3] QUrl QQmlExtensionPlugin::baseUrl() const

This function is deprecated since 6.3. We strongly advise against using it in new code.

This is unnecessary and doesn't work for optional plugins

Returns the URL of the directory from which the extension is loaded.

This is useful when the plugin also needs to load QML files or other assets from the same directory.

Note: You should not need this function. Other files that are part of the module's public interface should be specified accordingly in the build system and qmldir file. The build system makes sure that they end up both in the final module directory, and in the resource file system. You can use the copy from the resource file system in the plugin. Non-QML/JS files private to the plugin can be added to the resource file system manually. However, consider moving all such functionality out of the plugin and making the plugin optional.

© 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.