Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • Users
  • Groups
  • Search
  • Get Qt Extensions
  • Unsolved
Collapse
Brand Logo
  1. Home
  2. Qt Development
  3. General and Desktop
  4. Plugin not shown in QtCreator
QtWS25 Last Chance

Plugin not shown in QtCreator

Scheduled Pinned Locked Moved Unsolved General and Desktop
pluginsqtcreator
11 Posts 4 Posters 4.4k Views
  • 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 Offline
    B Offline
    Bagavathi
    wrote on last edited by
    #1

    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
    0
    • mrjjM Offline
      mrjjM Offline
      mrjj
      Lifetime Qt Champion
      wrote on last edited by mrjj
      #2

      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
      4
      • B Offline
        B Offline
        Bagavathi
        wrote on last edited by
        #3

        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

        mrjjM 1 Reply Last reply
        0
        • B Bagavathi

          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

          mrjjM Offline
          mrjjM Offline
          mrjj
          Lifetime Qt Champion
          wrote on last edited by
          #4

          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
          1
          • D Offline
            D Offline
            djvi
            wrote on last edited by djvi
            #5

            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.

            mrjjM 1 Reply Last reply
            0
            • D 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.

              mrjjM Offline
              mrjjM Offline
              mrjj
              Lifetime Qt Champion
              wrote on last edited by
              #6

              @djvi

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

              1 Reply Last reply
              1
              • D Offline
                D Offline
                djvi
                wrote on last edited by djvi
                #7

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

                jsulmJ 1 Reply Last reply
                0
                • D djvi

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

                  jsulmJ Offline
                  jsulmJ Offline
                  jsulm
                  Lifetime Qt Champion
                  wrote on last edited by
                  #8

                  @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
                  2
                  • D Offline
                    D Offline
                    djvi
                    wrote on last edited by
                    #9

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

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

                    mrjjM 1 Reply Last reply
                    0
                    • D djvi

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

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

                      mrjjM Offline
                      mrjjM Offline
                      mrjj
                      Lifetime Qt Champion
                      wrote on last edited by mrjj
                      #10

                      @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
                      2
                      • D Offline
                        D Offline
                        djvi
                        wrote on last edited by
                        #11

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

                        1 Reply Last reply
                        1

                        • Login

                        • Login or register to search.
                        • First post
                          Last post
                        0
                        • Categories
                        • Recent
                        • Tags
                        • Popular
                        • Users
                        • Groups
                        • Search
                        • Get Qt Extensions
                        • Unsolved