On Fri, Jan 14, 2022 at 7:18 AM Ulf Hermann <ulf.herm...@qt.io> wrote:

> Well, no, that doesn't work. If your module is called Tsc.Ui, then it
> needs to live in a directory called Tsc/Ui/, not TscUi/. That's the
> reason why the explicit file system import path doesn't work either.
>

Perhaps that's how it's supposed to work, but I'm not intending to mess
around with the target output paths in cmake. It simply makes no sense to
me.

I guess your linker ignored the linkage because you don't "use" any
> symbols from the linked library. You need to do the plugin linking trick
> with Q_IMPORT_QML_PLUGIN.
>

That doesn't work as it's not a static plugin. However this put me on the
right track (or at least I believe it is). Adding this to main():

extern void Q_DECL_IMPORT qml_register_types_Tsc_Ui();

qml_register_types_Tsc_Ui();

Did load the resources properly and I can see the QML module is loaded
(after also adding the import path to ":/")

So is this the "correct" way to do it with my setup with NO_PLUGIN,
then? I can live with the manual call, I'm just wondering if that's
the way.
_______________________________________________
Interest mailing list
Interest@qt-project.org
https://lists.qt-project.org/listinfo/interest

Reply via email to