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. Cannot add plugin into QtDesigner
Forum Updated to NodeBB v4.3 + New Features

Cannot add plugin into QtDesigner

Scheduled Pinned Locked Moved Solved General and Desktop
qtdesignerplugin
14 Posts 5 Posters 6.9k Views 3 Watching
  • 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.
  • A Offline
    A Offline
    Amott
    wrote on last edited by
    #1

    Hi everyone,

    I'm facing a problem when I want to use my custom widget into QtDesigner. For the moment, I try to use the example "World time clock plugin" provide with Qt, but I'm lost.
    Here is what I did :

    • I have executed qmake
    • I have build the example in debug and release
    • I have placed the generated dll into the folder C:\Qt\Tools\QtCreator\bin\plugins\designer

    But when I go to tools -> Form editor -> about QtDesigner plugin, both dll are detected, but failed to load : the release dll has failed because the specified procedure could not be find, and the debug dll is using another Qt library incompatible.
    I don't understand those errors, if someone can help me I would be glad :)

    Ps : I'm using Qt 5.7, QtCreator 4.0.2 and Windows 10

    Thanks !

    1 Reply Last reply
    0
    • mrjjM Offline
      mrjjM Offline
      mrjj
      Lifetime Qt Champion
      wrote on last edited by mrjj
      #2

      Hi
      Since Qt Creator is compiled with Visual Studio I think you need to compile the
      Designer plugins with same version of VS as far as I understand.

      Basically plugins are DLLS and it didn't want to load any plugins
      i compiled with mingw compiler. (on windows)

      Note:
      While having full blown designer plugins are cool, the promote feature
      also let u use own custom widgets in faster way.

      1 Reply Last reply
      1
      • A Offline
        A Offline
        Amott
        wrote on last edited by
        #3

        Hi mrjj !

        Thanks for your response !

        I'll try to compile those DLL with msvc, i will let you know if it works.
        The thing is my widget is pretty "heavy", it uses databases, animations, big images... a lot of things and it will be use in other projects in the future so I don't think that the promote feature is useful

        mrjjM 1 Reply Last reply
        0
        • A Amott

          Hi mrjj !

          Thanks for your response !

          I'll try to compile those DLL with msvc, i will let you know if it works.
          The thing is my widget is pretty "heavy", it uses databases, animations, big images... a lot of things and it will be use in other projects in the future so I don't think that the promote feature is useful

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

          @Amott
          Well promote is most useful if you want to design with a spot for a custom control and then
          run the real thing later.

          If you want to visually change the custom Widget in Designer
          promote feature is boring. :)

          1 Reply Last reply
          1
          • -AVM- Offline
            -AVM- Offline
            -AVM
            wrote on last edited by
            #5

            if you need to add plugin into your project.....first add library to your .pro file.

            A 1 Reply Last reply
            0
            • -AVM- -AVM

              if you need to add plugin into your project.....first add library to your .pro file.

              A Offline
              A Offline
              Amott
              wrote on last edited by
              #6

              so, one day has passed and I can't compile with msvc... Qt can't find the compiler but I have installed it...

              @-AVM Which library ? The .pro file of the example should be complete, no ?

              mrjjM 1 Reply Last reply
              0
              • A Amott

                so, one day has passed and I can't compile with msvc... Qt can't find the compiler but I have installed it...

                @-AVM Which library ? The .pro file of the example should be complete, no ?

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

                @Amott
                Hi
                Just to be sure.
                Did u also run the maintenance tool and selected
                the correct Qt for Visual Studio XXX version ?

                In the picture i have 5.7 installed for the mingw compiler.
                And nothing for VS.

                A 1 Reply Last reply
                0
                • mrjjM mrjj

                  @Amott
                  Hi
                  Just to be sure.
                  Did u also run the maintenance tool and selected
                  the correct Qt for Visual Studio XXX version ?

                  In the picture i have 5.7 installed for the mingw compiler.
                  And nothing for VS.

                  A Offline
                  A Offline
                  Amott
                  wrote on last edited by
                  #8

                  @mrjj Yes and to be sure I have installed every msvc : msvc2013 32-bit, msvc2013 64-bit and msvc2015 32-bit, msvc2015 64-bit

                  1 Reply Last reply
                  0
                  • Chris KawaC Online
                    Chris KawaC Online
                    Chris Kawa
                    Lifetime Qt Champion
                    wrote on last edited by
                    #9

                    You don't need to blindly test every MSVC version. Open QtCreator and click "About -> Qt Creator". The version used is displayed there e.g. Qt Creator 4.0.2 Based on Qt 5.7.0 (MSVC 2013, 32 bit). That's the only version that will work and the plugin needs to be compiled in release mode.

                    As for obtaining MSVC - Installing Qt package for MSVC does not install MSVC itself! You need to download it from Microsoft's site.

                    A 1 Reply Last reply
                    1
                    • Chris KawaC Chris Kawa

                      You don't need to blindly test every MSVC version. Open QtCreator and click "About -> Qt Creator". The version used is displayed there e.g. Qt Creator 4.0.2 Based on Qt 5.7.0 (MSVC 2013, 32 bit). That's the only version that will work and the plugin needs to be compiled in release mode.

                      As for obtaining MSVC - Installing Qt package for MSVC does not install MSVC itself! You need to download it from Microsoft's site.

                      A Offline
                      A Offline
                      Amott
                      wrote on last edited by
                      #10

                      @Chris-Kawa Yes, I have this version. Yesterday I downloaded msvc 2013 and 2015 from Microsoft's site but it said that a version is already installed

                      1 Reply Last reply
                      0
                      • A Offline
                        A Offline
                        Amott
                        wrote on last edited by
                        #11

                        I finally found a solution : I have uninstalled and reinstalled QtCreator.
                        So now I can compile the example in msvc2015 in 32 and 64bit, I did it in release and place the generated DLL into
                        C:\Qt\Tools\QtCreator\bin\plugins\designer
                        but I still have the same error : worldtimeclockplugin.dll : %1 is not a valid Win32 application

                        JKSHJ 1 Reply Last reply
                        0
                        • A Amott

                          I finally found a solution : I have uninstalled and reinstalled QtCreator.
                          So now I can compile the example in msvc2015 in 32 and 64bit, I did it in release and place the generated DLL into
                          C:\Qt\Tools\QtCreator\bin\plugins\designer
                          but I still have the same error : worldtimeclockplugin.dll : %1 is not a valid Win32 application

                          JKSHJ Offline
                          JKSHJ Offline
                          JKSH
                          Moderators
                          wrote on last edited by
                          #12

                          @Amott said:

                          So now I can compile the example in msvc2015

                          You need the same version of MSVC that was used to build Qt Creator.

                          In Qt Creator, click "Help" -> "About Qt Creator...". If it says "MSVC 2013", then you must use MSVC 2013. MSVC 2015 is not compatible.

                          Qt Doc Search for browsers: forum.qt.io/topic/35616/web-browser-extension-for-improved-doc-searches

                          1 Reply Last reply
                          0
                          • A Offline
                            A Offline
                            Amott
                            wrote on last edited by
                            #13

                            oh sorry, I was too distracted, chris said it before I have forgotten
                            I test it

                            1 Reply Last reply
                            0
                            • A Offline
                              A Offline
                              Amott
                              wrote on last edited by
                              #14

                              and it works ! Thank you all :)

                              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