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. How do I make a Qt Designer Plugin?
QtWS25 Last Chance

How do I make a Qt Designer Plugin?

Scheduled Pinned Locked Moved Unsolved General and Desktop
11 Posts 4 Posters 1.7k 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.
  • K Offline
    K Offline
    KidSault
    wrote on 30 May 2019, 03:16 last edited by KidSault
    #1

    I've been looking through Google, Youtube, & Qt Documentation for the last 6 hours or so in order to try and figure out how to make a new plugin for Qt Designer so that I can simply click and drag the new UI Element onto a form, but I feel like I've made 0 headway in terms of getting it working.

    The closest I've gotten is from here: https://doc.qt.io/qt-5/qtdesigner-customwidgetplugin-example.html

    I followed those instructions, but the new custom widget did not appear on the Qt Designer tool list.

    Ideally, someone could explain (preferably through a video... as I can't seem to find any) how to create a custom plugin from start to finish; because right now I'm super confused. I'm astonished there hasn't been a single video guide showing this...

    J 1 Reply Last reply 30 May 2019, 04:15
    0
    • K KidSault
      30 May 2019, 03:16

      I've been looking through Google, Youtube, & Qt Documentation for the last 6 hours or so in order to try and figure out how to make a new plugin for Qt Designer so that I can simply click and drag the new UI Element onto a form, but I feel like I've made 0 headway in terms of getting it working.

      The closest I've gotten is from here: https://doc.qt.io/qt-5/qtdesigner-customwidgetplugin-example.html

      I followed those instructions, but the new custom widget did not appear on the Qt Designer tool list.

      Ideally, someone could explain (preferably through a video... as I can't seem to find any) how to create a custom plugin from start to finish; because right now I'm super confused. I'm astonished there hasn't been a single video guide showing this...

      J Offline
      J Offline
      JKSH
      Moderators
      wrote on 30 May 2019, 04:15 last edited by
      #2

      Hi @KidSault,

      1. Did you build your plugin using the same compiler version and Qt version that was used to build Qt Creator? (See Qt Creator > Help > About Qt Creator... for these details)
      2. After you built your plugin, did you install it into the Qt Designer plugins folder? (the default Windows folder is C:\Qt\Tools\QtCreator\bin\plugins\designer )

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

      1 Reply Last reply
      2
      • K Offline
        K Offline
        KidSault
        wrote on 30 May 2019, 04:40 last edited by KidSault
        #3

        @JKSH

        1. Looking at it now, it's 0.0.3 versions off... The version I built with (only once available to me) is 15.12.0 (See the pictures)
          alt text
          alt text
          alt text

        2. I did.

        Here are the exact steps I took....

        1. Create a new C++ Library project in QT Creator.
        2. Copy and paste all the files provided on the guide exactly as they are.
        3. Change compile to Release mode & click Build, followed by Rebuild All.
        4. Copy the new .dll to the Qt Designer Plugins folder.
        5. Restart Qt, make a new sample widget program... Check Qt Designer Tools & nothing new is there.
        J 1 Reply Last reply 30 May 2019, 05:21
        0
        • K KidSault
          30 May 2019, 04:40

          @JKSH

          1. Looking at it now, it's 0.0.3 versions off... The version I built with (only once available to me) is 15.12.0 (See the pictures)
            alt text
            alt text
            alt text

          2. I did.

          Here are the exact steps I took....

          1. Create a new C++ Library project in QT Creator.
          2. Copy and paste all the files provided on the guide exactly as they are.
          3. Change compile to Release mode & click Build, followed by Rebuild All.
          4. Copy the new .dll to the Qt Designer Plugins folder.
          5. Restart Qt, make a new sample widget program... Check Qt Designer Tools & nothing new is there.
          J Offline
          J Offline
          JKSH
          Moderators
          wrote on 30 May 2019, 05:21 last edited by
          #4

          @KidSault Your version of Qt Creator was built using MSVC 2017 32-bit. Therefore, you must also use MSVC 2017 32-bit to build your plugin. (Your screenshot shows MinGW 64-bit, which is not compatible)

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

          1 Reply Last reply
          2
          • K Offline
            K Offline
            KidSault
            wrote on 30 May 2019, 06:26 last edited by
            #5

            Hmm you're right @JKSH. I guess I jumped the gun there....

            I just did a fresh install of Qt & for whatever reason the compiler for that isn't on there... Any idea how I can get it?

            alt text

            J 1 Reply Last reply 30 May 2019, 06:38
            0
            • S Offline
              S Offline
              SGaist
              Lifetime Qt Champion
              wrote on 30 May 2019, 06:29 last edited by
              #6

              Hi,

              From the looks of it you installed Visual Studio 2019, didn't you ?

              Interested in AI ? www.idiap.ch
              Please read the Qt Code of Conduct - https://forum.qt.io/topic/113070/qt-code-of-conduct

              K 1 Reply Last reply 30 May 2019, 06:36
              1
              • S SGaist
                30 May 2019, 06:29

                Hi,

                From the looks of it you installed Visual Studio 2019, didn't you ?

                K Offline
                K Offline
                KidSault
                wrote on 30 May 2019, 06:36 last edited by
                #7

                Hello @SGaist, yes I did. Can I not somehow use it with this version of Qt?

                1 Reply Last reply
                0
                • K KidSault
                  30 May 2019, 06:26

                  Hmm you're right @JKSH. I guess I jumped the gun there....

                  I just did a fresh install of Qt & for whatever reason the compiler for that isn't on there... Any idea how I can get it?

                  alt text

                  J Offline
                  J Offline
                  JKSH
                  Moderators
                  wrote on 30 May 2019, 06:38 last edited by JKSH
                  #8

                  @KidSault said in How do I make a Qt Designer Plugin?:

                  for whatever reason the compiler for that isn't on there... Any idea how I can get it?

                  Your screenshot shows that you have MSVC 2019 installed (Visual C++ Compiler 16.0). This should be compatible with MSVC 2017. Select Microsoft Visual C++ Compiler 16.0.28803.202 (x86) for your MSVC 2017 32-bit kit.

                  Note: Qt is a C++ library. You normally need to download the C++ compiler from the compiler's producer (which is Microsoft for MSVC).

                  I just did a fresh install of Qt

                  It looks like you installed every single kit under "Qt 5.12.3", which would have been ~20 GB?

                  In the future, expand "Qt 5.12.3" and only select the kits that you want.

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

                  1 Reply Last reply
                  2
                  • K Offline
                    K Offline
                    KidSault
                    wrote on 30 May 2019, 07:30 last edited by
                    #9

                    @JKSH THANK YOU.

                    So I uninstalled Qt again, and then I re-installed with only the required kits. However, I was still unable to compile using MSVC 2017 option (even when selecting 2019).

                    So I booted up Visual Studio Installer, modified my current install to include the MSVC 2017 32 & 64 compiler and build tools. Then I restarted QT, manually selected the compilers in settings, built, and bam it worked!

                    Thank YOU!!

                    S 1 Reply Last reply 30 May 2019, 19:55
                    2
                    • M Offline
                      M Offline
                      mrjj
                      Lifetime Qt Champion
                      wrote on 30 May 2019, 07:58 last edited by mrjj
                      #10

                      Hi
                      Just as a note.
                      You can use custom Widgets in Design mode without using a plugin.
                      Creator has a feature called promotion.
                      https://doc.qt.io/qt-5/designer-using-custom-widgets.html
                      You can even drag a promoted Widget from the form to the left side widget bar and have your widget there also
                      ready to be dragged into any form. already promoted.

                      However, promotion, do not allow Design time adjustment of properties for properties not
                      in the base class. Also if your custom widget has a new paint function, that is first seen when run.

                      1 Reply Last reply
                      1
                      • K KidSault
                        30 May 2019, 07:30

                        @JKSH THANK YOU.

                        So I uninstalled Qt again, and then I re-installed with only the required kits. However, I was still unable to compile using MSVC 2017 option (even when selecting 2019).

                        So I booted up Visual Studio Installer, modified my current install to include the MSVC 2017 32 & 64 compiler and build tools. Then I restarted QT, manually selected the compilers in settings, built, and bam it worked!

                        Thank YOU!!

                        S Offline
                        S Offline
                        SGaist
                        Lifetime Qt Champion
                        wrote on 30 May 2019, 19:55 last edited by
                        #11

                        @KidSault said in How do I make a Qt Designer Plugin?:

                        @JKSH THANK YOU.

                        So I uninstalled Qt again, and then I re-installed with only the required kits. However, I was still unable to compile using MSVC 2017 option (even when selecting 2019).

                        So I booted up Visual Studio Installer, modified my current install to include the MSVC 2017 32 & 64 compiler and build tools. Then I restarted QT, manually selected the compilers in settings, built, and bam it worked!

                        Thank YOU!!

                        Hi,

                        There is a "small" catch with the Visual Studio installer: by default the C++ tools are not selected by default.

                        I think you have been bitten by that.

                        Interested in AI ? www.idiap.ch
                        Please read the Qt Code of Conduct - https://forum.qt.io/topic/113070/qt-code-of-conduct

                        1 Reply Last reply
                        1

                        10/11

                        30 May 2019, 07:58

                        • Login

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