Qt Forum

    • Login
    • Search
    • Categories
    • Recent
    • Tags
    • Popular
    • Users
    • Groups
    • Search
    • Unsolved

    Update: Forum Guidelines & Code of Conduct

    Unsolved Plugin not shown in QtCreator

    General and Desktop
    plugins qtcreator
    4
    11
    3592
    Loading More Posts
    • Oldest to Newest
    • Newest to Oldest
    • Most Votes
    Reply
    • Reply as topic
    Log in to reply
    This topic has been deleted. Only users with topic management privileges can see it.
    • B
      Bagavathi last edited by

      I am using Qt 5.7 MinGW Version.

      I am refering the below link to create the custom widget like a plugin.

      World Clock Example

      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.

      1 Reply Last reply Reply Quote 0
      • mrjj
        mrjj Lifetime Qt Champion last edited by mrjj

        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.

        1 Reply Last reply Reply Quote 4
        • B
          Bagavathi last edited by

          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

          mrjj 1 Reply Last reply Reply Quote 0
          • mrjj
            mrjj Lifetime Qt Champion @Bagavathi last edited by

            Hi
            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?

            1 Reply Last reply Reply Quote 1
            • D
              djvi last edited by djvi

              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 projet

              Thanks for any incoming help.

              mrjj 1 Reply Last reply Reply Quote 0
              • mrjj
                mrjj Lifetime Qt Champion @djvi last edited by

                @djvi

                and you are using visual studio 2013 compiler?
                for your plugin ?

                1 Reply Last reply Reply Quote 1
                • D
                  djvi last edited by djvi

                  Should I ? (I use desktop qt 5.7 mingw 32 bit)

                  jsulm 1 Reply Last reply Reply Quote 0
                  • jsulm
                    jsulm Lifetime Qt Champion @djvi last edited by

                    @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.

                    https://forum.qt.io/topic/113070/qt-code-of-conduct

                    1 Reply Last reply Reply Quote 2
                    • D
                      djvi last edited by

                      If I rebuild qt creator with mingw, the plugin should work then ?

                      Is it longer to set up msvc compiler or rebuild qt creator ?

                      mrjj 1 Reply Last reply Reply Quote 0
                      • mrjj
                        mrjj Lifetime Qt Champion @djvi last edited by mrjj

                        @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 ;)

                        1 Reply Last reply Reply Quote 2
                        • D
                          djvi last edited by

                          It was indeed compiling with mingw which was the issue. Thanks mrjj and jsulm for the fast answers.

                          1 Reply Last reply Reply Quote 1
                          • First post
                            Last post