Plugin not shown in QtCreator
-
I am using Qt 5.7 MinGW Version.
I am refering the below link to create the custom widget like a plugin.
I compiled the project successfully and i placed the worldtimeclockplugin.dll file manually in this path e:\Qt\Qt5.7.0\Tools\QtCreator\bin\plugins\designer\
But QtCreator is not showing the world clock in the tool sets. I checked in the Plugin information and it is showing that "The specified procedure could not be found".
Please advise me to resolve the problem.
-
Hi
You must use Visual Studio to create plugins for Creator. (on windows)
It must be the same version as listed in about.In this case VS 2013.
-
Thank you Mr mrjj.
I've placed the same dll in the below folder:
E:\Qt\Qt5.7.0\5.7\mingw53_32\plugins\designer
So I can able to see the controls in Qt Designer tool box. But it is not working in Qt creator. I thought the Qt designer is loading inside the Qt creator. As per your statement, Visual studio version is supporting to create a plugin for Qt Designer not MinGW version.
Can I get more information on that for better understanding.
Thanks & Regards
Bagavathikumar -
Thank you Mr mrjj.
I've placed the same dll in the below folder:
E:\Qt\Qt5.7.0\5.7\mingw53_32\plugins\designer
So I can able to see the controls in Qt Designer tool box. But it is not working in Qt creator. I thought the Qt designer is loading inside the Qt creator. As per your statement, Visual studio version is supporting to create a plugin for Qt Designer not MinGW version.
Can I get more information on that for better understanding.
Thanks & Regards
BagavathikumarHi
Im not really sure what you are saying?If you can see your Control in the list in Designer.
What part is NOT working then?
"But it is not working in Qt creator"In which way?
-
Hi,
I have exactly the same issue, I created a collection of widget using the template for qt designer plugin in qt creator. The plugin compile but when I add the resulting dll in "C:\Qt\Qt5.7.0\Tools\QtCreator\bin\plugins\designer" and open the dialog "About Qt designer plugins", it says "the specified procedure could not be found" next to my plugin.
I haven't changed anything in the project generated by the template of Qt creator. (Below the files I think might be responsible for the problem).
"ModularIHM.pro" CONFIG += plugin debug_and_release TARGET = $$qtLibraryTarget(modularihmplugin) TEMPLATE = lib HEADERS = modularareaplugin.h modularwidgetplugin.h modularihm.h SOURCES = modularareaplugin.cpp modularwidgetplugin.cpp modularihm.cpp RESOURCES = icons.qrc LIBS += -L. greaterThan(QT_MAJOR_VERSION, 4) { QT += designer } else { CONFIG += designer } target.path = $$[QT_INSTALL_PLUGINS]/designer INSTALLS += target include(modularwidget.pri) include(modulararea.pri)
/*modularareaplugin.h*/ #ifndef MODULARAREAPLUGIN_H #define MODULARAREAPLUGIN_H #include <QDesignerCustomWidgetInterface> class ModularAreaPlugin : public QObject, public QDesignerCustomWidgetInterface { Q_OBJECT Q_INTERFACES(QDesignerCustomWidgetInterface) public: ModularAreaPlugin(QObject *parent = 0); bool isContainer() const; bool isInitialized() const; QIcon icon() const; QString domXml() const; QString group() const; QString includeFile() const; QString name() const; QString toolTip() const; QString whatsThis() const; QWidget *createWidget(QWidget *parent); void initialize(QDesignerFormEditorInterface *core); private: bool m_initialized; }; #endif
/*modularihm.h*/ #ifndef MODULARIHM_H #define MODULARIHM_H #include <QtDesigner> #include <qplugin.h> class ModularIHM : public QObject, public QDesignerCustomWidgetCollectionInterface { Q_OBJECT Q_INTERFACES(QDesignerCustomWidgetCollectionInterface) #if QT_VERSION >= 0x050000 Q_PLUGIN_METADATA(IID "org.qt-project.Qt.QDesignerCustomWidgetCollectionInterface") #endif // QT_VERSION >= 0x050000 public: explicit ModularIHM(QObject *parent = 0); virtual QList<QDesignerCustomWidgetInterface*> customWidgets() const; private: QList<QDesignerCustomWidgetInterface*> m_widgets; }; #endif
/*modularwidgetplugin.h*/ #ifndef MODULARWIDGETPLUGIN_H #define MODULARWIDGETPLUGIN_H #include <QDesignerCustomWidgetInterface> class ModularWidgetPlugin : public QObject, public QDesignerCustomWidgetInterface { Q_OBJECT Q_INTERFACES(QDesignerCustomWidgetInterface) public: ModularWidgetPlugin(QObject *parent = 0); bool isContainer() const; bool isInitialized() const; QIcon icon() const; QString domXml() const; QString group() const; QString includeFile() const; QString name() const; QString toolTip() const; QString whatsThis() const; QWidget *createWidget(QWidget *parent); void initialize(QDesignerFormEditorInterface *core); private: bool m_initialized; }; #endif
If a file is missing to solve the issue, just ask.
arborescence du projetThanks for any incoming help.
-
Hi,
I have exactly the same issue, I created a collection of widget using the template for qt designer plugin in qt creator. The plugin compile but when I add the resulting dll in "C:\Qt\Qt5.7.0\Tools\QtCreator\bin\plugins\designer" and open the dialog "About Qt designer plugins", it says "the specified procedure could not be found" next to my plugin.
I haven't changed anything in the project generated by the template of Qt creator. (Below the files I think might be responsible for the problem).
"ModularIHM.pro" CONFIG += plugin debug_and_release TARGET = $$qtLibraryTarget(modularihmplugin) TEMPLATE = lib HEADERS = modularareaplugin.h modularwidgetplugin.h modularihm.h SOURCES = modularareaplugin.cpp modularwidgetplugin.cpp modularihm.cpp RESOURCES = icons.qrc LIBS += -L. greaterThan(QT_MAJOR_VERSION, 4) { QT += designer } else { CONFIG += designer } target.path = $$[QT_INSTALL_PLUGINS]/designer INSTALLS += target include(modularwidget.pri) include(modulararea.pri)
/*modularareaplugin.h*/ #ifndef MODULARAREAPLUGIN_H #define MODULARAREAPLUGIN_H #include <QDesignerCustomWidgetInterface> class ModularAreaPlugin : public QObject, public QDesignerCustomWidgetInterface { Q_OBJECT Q_INTERFACES(QDesignerCustomWidgetInterface) public: ModularAreaPlugin(QObject *parent = 0); bool isContainer() const; bool isInitialized() const; QIcon icon() const; QString domXml() const; QString group() const; QString includeFile() const; QString name() const; QString toolTip() const; QString whatsThis() const; QWidget *createWidget(QWidget *parent); void initialize(QDesignerFormEditorInterface *core); private: bool m_initialized; }; #endif
/*modularihm.h*/ #ifndef MODULARIHM_H #define MODULARIHM_H #include <QtDesigner> #include <qplugin.h> class ModularIHM : public QObject, public QDesignerCustomWidgetCollectionInterface { Q_OBJECT Q_INTERFACES(QDesignerCustomWidgetCollectionInterface) #if QT_VERSION >= 0x050000 Q_PLUGIN_METADATA(IID "org.qt-project.Qt.QDesignerCustomWidgetCollectionInterface") #endif // QT_VERSION >= 0x050000 public: explicit ModularIHM(QObject *parent = 0); virtual QList<QDesignerCustomWidgetInterface*> customWidgets() const; private: QList<QDesignerCustomWidgetInterface*> m_widgets; }; #endif
/*modularwidgetplugin.h*/ #ifndef MODULARWIDGETPLUGIN_H #define MODULARWIDGETPLUGIN_H #include <QDesignerCustomWidgetInterface> class ModularWidgetPlugin : public QObject, public QDesignerCustomWidgetInterface { Q_OBJECT Q_INTERFACES(QDesignerCustomWidgetInterface) public: ModularWidgetPlugin(QObject *parent = 0); bool isContainer() const; bool isInitialized() const; QIcon icon() const; QString domXml() const; QString group() const; QString includeFile() const; QString name() const; QString toolTip() const; QString whatsThis() const; QWidget *createWidget(QWidget *parent); void initialize(QDesignerFormEditorInterface *core); private: bool m_initialized; }; #endif
If a file is missing to solve the issue, just ask.
arborescence du projetThanks for any incoming help.
-
@djvi Yes, you should (actually you have to). QtCreator is built using Visual Studio, not MinGW. On Windows you cannot mix binaries built with different compilers. In "About Qt Creator" you can see which compiler and Qt version were used to build QtCreator.
-
If I rebuild qt creator with mingw, the plugin should work then ?
Is it longer to set up msvc compiler or rebuild qt creator ?
@djvi
yes, if you grab source and rebuild Creator, it can then load
plugins created with mingw.Just did it a week ago. and I would say installing 2013 Vs and compile with Creator + Vs compiler
is faster then make a new mingw Creator, mostly due to the huge compile time.
Also it had issue starting due to missing DLLS so if u got space on c, installing VS
2013 will be faster, even its kinda a fatso ;)