[Development] Help with Plugin
steveg2357 at gmail.com
Thu Jun 5 23:17:43 CEST 2014
I am trying to create a plugin consisting of QML types but no C++ classes. I built a simple QML file called MyPlugin.qml that starts with “pragma Singleton” and resides in <mypath>\MyPlugin. My qmldir file consists of
singleton MyPlugin 1.0 MyPlugin.qml
When I run
<qtpath>\5.3\mingw482_32\bin\qmlplugindump -nonrelocatable MyPlugin 1.0 .
from <mypath> a plugins.qmltypes file is created with
exports: ["MyPlugin -1.-1"]
. . .
and all of the methods (corresponding to my functions) and their parameters have type QVariant.
Is my qmldir correct to generate the plugins.qmltypes file? Why do exports and exportMetaObjectRevisions have such strange contents? Should these be changed to “MyPlugin 1.0” and 0, respectively? Should the QVariant types be manually changed?
Are there any examples of creating and using Qt plugins made entirely with just QML and no C++? It would be useful to see an example that creates (1) library files, (2) plugins.qmltypes, and (3) an app using the output of 1 and 2.
-------------- next part --------------
An HTML attachment was scrubbed...
More information about the Development