How to access qml files of plugins defined in qmldir?
Unsolved
General and Desktop
-
Hi Guys, I am currently trying to set up a plugin system for QML extensions. For that i came across the qmldir file, where it seems that you can define which scripts and qml files are packed in a QML extension. I tried to add a qml file in my qmldir which is set up like that:
module NameList plugin NameListPlugin NameList 1.0 NameListComponent.qml classname NameListPlugin classname NameListInterface
Unfortunately in the consuming app I get the exception that the module namelist is not available and escepially NameListComponent.qml is a unknown type. I try to use it in an qml file like this:
import QtQuick 2.14 import QtQuick.Window 2.14 import NameList 1.0 import QtQuick.Controls 2.0 import QtQuick.Layouts 1.3 // this is only possible because it was registered in main.cpp! Window { width: 640 height: 480 visible: true title: qsTr("Hello World") NameListComponent{ } }
Why could that be the case and how to use it really?