Details
Description
I am trying to build a static QML plugin and a test application using it (see attached project files). So far, I have succeeded in building the plugin and application, but when I try to run it (using qbs run), I get the following error message:
file:///home/dt/work/testqtplugin/test/tst_foo.qml:3:1: static plugin for module "myplugin" with name "MyPlugin" has no metadata URI import myplugin 1.0 ^ ********* Start testing of myplugin ********* Config: Using QtTest library 5.7.0, Qt 5.7.0 (x86_64-little_endian-lp64 shared (dynamic) release build; by GCC 4.9.1 20140922 (Red Hat 4.9.1-10)) QWARN : myplugin::tst_foo::compile() /home/dt/work/testqtplugin/test/tst_foo.qml produced 1 error(s): /home/dt/work/testqtplugin/test/tst_foo.qml:3,1: static plugin for module "myplugin" with name "MyPlugin" has no metadata URI Working directory: /home/dt/work/testqtplugin View: QQuickView, import paths: '/home/dt/work/testqtplugin/qt5-debug/install-root/bin' 'qrc:/qt-project.org/imports' '/home/dt/Qt/5.7/gcc_64/qml' Plugin paths: '.'
With QMake, the solution was adding
QMAKE_MOC_OPTIONS += -Muri=myplugin
to the .pro file.
Currently, there is no property in Qbs for setting arbitrary moc flags.