[Interest] QQmlExtensionPlugin not loading

Jesper Huijgens jesper.huijgens at sioux.eu
Fri Mar 9 14:53:36 CET 2018


Ok, I see what the problem is.

I expected Qt to automatically register the types. Even without the 
import statement.

--
Jesper

On 09-03-18 14:44, Martin Leutelt wrote:
>
> *From: * Jesper Huijgens <jesper.huijgens at sioux.eu>
> *To: * <interest at qt-project.org>
> *Sent: * 3/9/2018 2:24 PM
> *Subject: * Re: [Interest] QQmlExtensionPlugin not loading
>
>     With QML_IMPORT_TRACE I see again the right folders. But I do not
>     see any attempt of loading the plugin.
>
>
> You're missing an import statement in your main.qml to load your 
> plugin (see http://doc.qt.io/qt-5/qtqml-modules-cppplugins.html).
> addPluginPath()/addLibraryPath() isn't necessary for QML plugins, but 
> (depending on your project hierarchy or how your application is 
> installed/deployed) you might need addImportPath().
>
>
>
>     Kind regards,
>     Jesper
>
>
> Regards
> Martin
>
>
>
>     On 09-03-18 14:20, Martin Leutelt wrote:
>>
>>     *From: * Jesper Huijgens <jesper.huijgens at sioux.eu>
>>     <mailto:jesper.huijgens at sioux.eu>
>>     *To: * <interest at qt-project.org> <mailto:interest at qt-project.org>
>>     *Sent: * 3/9/2018 2:04 PM
>>     *Subject: * [Interest] QQmlExtensionPlugin not loading
>>
>>         Hi all,
>>
>>         For our project we see that QQmlExtensionPlugins are not loaded.
>>         I made a very basic example project that creates a
>>         QQmlExtensionPlugin
>>         and an application that should use. The plugin, with the
>>         corresponding
>>         qmldir, are placed in a plugin subdir in the output directory
>>         of the
>>         application.
>>         The application sets both libraryPath and pluginPath. I
>>         output the
>>         pluginPathList(), I see what I think are the correct folders
>>         on the
>>         debug output.
>>
>>         I placed a qDebug() in registerTypes of the plugin. I see
>>         nothing on the
>>         debug output.
>>
>>         Setting QT_DEBUG_PLUGINS to 1 show me a lot of libraries
>>         being loaded.
>>         But not my plugin.
>>
>>
>>     Try QML_IMPORT_TRACE instead, since QT_DEBUG_PLUGINS is for
>>     debugging plugins for Qt itself, not the QML engine.
>>
>>         I work on KDE Neon with g++ 5.4.0, CMake 3.10.0 and Qt 5.10.
>>
>>         Kind regards,
>>         Jesper
>>
>>
>>
>>     Regards
>>     Martin
>>
>>
>>         _______________________________________________
>>         Interest mailing list
>>         Interest at qt-project.org <mailto:Interest at qt-project.org>
>>         http://lists.qt-project.org/mailman/listinfo/interest
>>
>>
>>
>>     _______________________________________________
>>     Interest mailing list
>>     Interest at qt-project.org <mailto:Interest at qt-project.org>
>>     http://lists.qt-project.org/mailman/listinfo/interest
>
>
>
>     _______________________________________________
>     Interest mailing list
>     Interest at qt-project.org
>     http://lists.qt-project.org/mailman/listinfo/interest
>
>
>
> _______________________________________________
> Interest mailing list
> Interest at qt-project.org
> http://lists.qt-project.org/mailman/listinfo/interest

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.qt-project.org/pipermail/interest/attachments/20180309/e3adb401/attachment.html>


More information about the Interest mailing list