You need to compile the plugin with same compiler as Creator itself
That means visual studio compiler ( mingw wont work) and also same version of
Qt ca. So a Qt 4.8 plugin wont load in a much newer creator.
so here i should use around Qt 5.11 and vs2015, 32 bit.
This is due to the plugins being DLLs and it simply cant load
Dlls produced by much older compiler and the Qt used must also be
at lease same major version.
There are only two caveats in this case. First, QML files that are to import anything from the library must first import 'MyLib 1.0' before importing anything else ('MyLib.Rectangle', 'MyLib.Circle', etc.). This is so that the plugin is loaded initially to populate the other imports. Secondly, this will produce the following message when the plugin is loaded:
Module 'MyLib' does not contain a module identifier directive - it cannot be protected from external registrations.
However in my case, this is not an issue and can be safely overlooked.
I have same problem and stacked long time at here .
Now I have use the QT5.10.1 maybe can get succeed.
I have no time on it, but i will try it from July.
If you have any new progress could you update on this topic?
I've changed it to check if it's in the first edit, to stop the timer so it'd look like
And then the user will have to manually hit "Delete" repeatedly to delete the characters. This way, the program doesn't crash. It's not exactly elegant, but it's close enough to the requirements I was given.
I have also changed that curEdit->installEventFilter(this) is only called once.
Thank you very much for your help, I will go ahead and mark this as solved.
Thank you @jsulm, I thought I read the documentation through, but apparently not. Also, I'm not calling QFrame. I saw the link I posted and used it as more of a guideline to create an IP Editor for my needs. Thank you for your help :)
Plugin Pro file like flow:
TEMPLATE = lib
TARGET = iostestqmlplugin
QT += qml quick
CONFIG += qt plugin c++11 static
uri = IosQmlPluginTest # module name
QMAKE_MOC_OPTIONS += -Muri=$$uri # static plugin must use this
typeinfo plugins.qmltypes #static plugin required
classname IosqmlpluginPlugin # static plugin must set classname for plugin c++ class
TimeLabel 1.0 qrc:/TimeLabel.qml # your self qml document
3.qrc file must contains qmldir file, Qt default put qmldir in qrc file with prefix likes: “/qt-project.org/imports/your-plugin-modele-name”, You can special yourself prefix but must endwiths “your-plugin-module-name” and in main cpp need add addImportPath(eg: engine.addImportPath(“qrc:/your-self-prefix-not-contains-your-plugin-module-name”))
4.put plugins.qmltypes, qmldir and plugin library files together into where Qt install dir’s sub fold name qml($$[QT_INSTALL_QML] Qt default serach path), maybe you can special yourself path in your app pro file by variable QMLPATHS(QMLPATHS += /your/plugin/path)
Init the plugin resources(contains qmldir) at plugin c++ class construction function like:Q_INIT_RESOURCE(your-qrc-file-name);
6.pulugins.qmltypes file it’s required. can gernerate by qmlplugindup tool.
7.refrence QtWebView plugin project from Qt source
1.static plugin for module “QtQuick” with name “your-module-name” has no metadata URI
fix by add in pro file:QMAKE_MOC_OPTIONS += -Muri=$$URI #URI = your-module-name
Well knowing windows searching, i always cheat and use https://www.voidtools.com/
On NTFS drives, it will find anything really fast and takes wildcards.
Its only for filenames but on the other hand, it finds a file in secs even on a 4 TB drive. :)
The meta data is specific to each plugin type. For QQmlExtensionPlugin, there are none, as of Qt 5.7 at least. The JSON properties are mentioned in the documentation of each plugin type that uses the meta data for something. For example, the meta data file of a QStylePlugin contains the name/key of the style(s) it provides, for QSqlDriverPlugin it's the name/key of the driver, and so on.