Important: Please read the Qt Code of Conduct -

How to hide qml source in Qt Quick 2 Extension Plugin?

  • Hello,

    I read the below link:

    I know how to compile qml source with qrc but my problem is Qt Quick 2 Extension Plugin, it needs "qmldir" which force me to put my qml source code aside the library which is created by Qt Quick 2 Extension Plugin.

    How to make qml sources hidden in this case?


  • It is so easy that's enough to write the qrc path in front qml module in qmldir


    module TimeExample
    Clock 1.0 Clock.qml
    plugin qmlqtimeexampleplugin

    convert it to

    module TimeExample
    Clock 1.0 qrc:/Clock .qml
    plugin qmlqtimeexampleplugin


Log in to reply