Hi Nuno,
the outlined approach should be safe, as long as you
- place all your own QML modules into qrc:/qt/qml (which
qt_add_qml_module will do)
- you repeat the same pattern for all QML engines if you have multiple
(e.g. when working with multiple QQuickViews)
Kind regards,
Fabian
On 30.07.25 12:23, Nuno Santos wrote:
[Sie erhalten nicht häufig E-Mails von nuno.san...@imaginando.pt. Weitere
Informationen, warum dies wichtig ist, finden Sie unter
https://aka.ms/LearnAboutSenderIdentification ]
Fabian,
Thanks for your swift reply.
That was indeed the problem. By setting the import path to:
engine()->setImportPathList(QStringList() << "qrc:/qt/qml" <<
"qrc:/qt-project.org/imports”);
Fixed the problem.
Do you see any other problem using this simple approach?
Thank you!
Best regards,
Nuno
On 30 Jul 2025, at 07:54, Fabian Kosmale via Interest <interest@qt-project.org>
wrote:
Hi Nuno,
in general, the host and plugin should not influence each other. There is
however one exception: Import paths specified via environment variables (like
QML2_IMPORT_PATH) might still affect the plugin.
Qt 6.10 allows setting the Qt::AA_PluginApplication attribute to avoid that
issue (https://codereview.qt-project.org/c/qt/qtdeclarative/+/627695), and if
you follow the referenced bug, you actually find a mention of DaVinci Resolve
as a host where this was necessary.
I assume that using 6.10 beta is not an option for you project, but you should
be able to get the same behaviour by explicitly setting
QQmlEngine::setImportPathList to the subset of import paths you care about –
notably those in the Qt resource system, as that should be completely
independent from the host.
Lastly, if even that does not help, collecting more information about import
process (via
https://doc.qt.io/qt-6/qtquick-debugging.html#debugging-module-imports) would
help to narrow down the issue further.
Kind regards,
Fabian
--
Fabian Kosmale
Manager R&D
The Qt Company GmbH
Erich-Thilo-Str. 10
D-12489 Berlin
fabian.kosm...@qt.io
+49 1638686070
_______________________________________________
Interest mailing list
Interest@qt-project.org
https://lists.qt-project.org/listinfo/interest
--
Fabian Kosmale
Manager R&D
The Qt Company GmbH
Erich-Thilo-Str. 10
D-12489 Berlin
fabian.kosm...@qt.io
+49 1638686070
_______________________________________________
Interest mailing list
Interest@qt-project.org
https://lists.qt-project.org/listinfo/interest