qmlscene does not recognise the qmlextensionplugin



  • I have created C++ QMLExtensionPlugin. I have created Qt Quick UI & executing qml through qmlscene. qmlscene is not recognising the plugin module.

    Here are the details -

    1. /Users/dheeru/qt/qml is the base directory and it contains Radio.qml
    2. /Users/dheeru/qt/qml/ contains the ‘plugins’ directory. Under the ‘plugins’ directory, i have created org/example/io directory. I have dumped the libFileio.dylib in this directory.
    3. Inside the Radio.qml file I have done import org.example.io.
    4. I have created qmldir. This contains the entry
      module org.example.io
      plugin Fileio .
    5. When I run the Radio.qml program using qmlscene it gives the error “module org.example.io is not found”.
    6. I tried copying the qmldir under /Users/dheeru/qt/qml, /Users/dheeru/qt/qml/plugins ,/Users/dheeru/qt/qml/org/example/io
    7. I have specified the importPaths: [ "./plugins" ] as well in project file.

    qmlscene is not able recognise org.example.io module.

    Please note -

    1. I have tried with C++ application with same plugin. It works.
    2. I have tried copying plugin under Qt installation directory & use qmlscene. It works.

    It does NOT work if copy the plugin under current working directory(/Users/dheeru/qt/qml/plugins)

    Any hints on this issue ?


Log in to reply