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. Custom widget debugging vs. designer.exe
Forum Updated to NodeBB v4.3 + New Features

Custom widget debugging vs. designer.exe

Scheduled Pinned Locked Moved Unsolved General and Desktop
14 Posts 5 Posters 881 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.
  • Pl45m4P Pl45m4

    @WWebber

    QtDesigner is a WYSIWYG editor. In which way you think the Designer should debug something?
    You dont need the Designer to debug your custom widget. The code should be enough

    W Offline
    W Offline
    WWebber
    wrote on last edited by
    #5

    @Pl45m4
    I don't want to debug designer.exe, I just want to debug my plugin with the wrapper interfaces to designer. For instance I have a widget code which works perfectly when I dynamically add it to a form, but as DLL with the wrapper code it just crashes designer.exe, when I drag it on a widget form. I know, it has to do with the order the values get assigned, but why I can't simply debug it?

    Pl45m4P 1 Reply Last reply
    0
    • W WWebber

      @Pl45m4
      I don't want to debug designer.exe, I just want to debug my plugin with the wrapper interfaces to designer. For instance I have a widget code which works perfectly when I dynamically add it to a form, but as DLL with the wrapper code it just crashes designer.exe, when I drag it on a widget form. I know, it has to do with the order the values get assigned, but why I can't simply debug it?

      Pl45m4P Offline
      Pl45m4P Offline
      Pl45m4
      wrote on last edited by
      #6

      @WWebber said in Custom widget debugging vs. designer.exe:

      I don't want to debug designer.exe, I just want to debug my plugin with the wrapper interfaces to designer

      Yeah sure... but that's still a code thing.

      when I dynamically add it to a form, but as DLL with the wrapper code it just crashes designer.exe, when I drag it on a widget form

      and the designer.exe itself will most likely not find the issue why the plugin doesn't work. You'll need to debug your plugin in debug mode with VS.
      Does enabling QT_DEBUG_PLUGINS show anything?


      If debugging is the process of removing software bugs, then programming must be the process of putting them in.

      ~E. W. Dijkstra

      1 Reply Last reply
      0
      • W WWebber

        @SGaist
        I'd like to develop and debug the custom widget DLL in VS. I put "designer.exe" in the command field of the debugging option and launch the VS debugger. Unfort. designer.exe does not even load the plugin with debug informations.
        I know, I can debug the custom widget itself, but not in combination with designer.exe.

        Pl45m4P Offline
        Pl45m4P Offline
        Pl45m4
        wrote on last edited by Pl45m4
        #7

        @WWebber said in Custom widget debugging vs. designer.exe:

        I know, I can debug the custom widget itself, but not in combination with designer.exe.

        and you cant find anything wrong there?!

        One thing you could do is something like this:

        • https://stackoverflow.com/questions/35961043/qt-designer-crashes-with-custom-plugin

        TBH, I have not much experience in writing Qt Designer plugins but it seems that you need to handle every case, no matter how unlikely it might be.
        (Check for variable initialisation, nullpointers, indices and their limits, etc.).
        If QtDesigner finds an edge case while loading / initialising your plugin and it doesn't work, the Designer might crash.


        If debugging is the process of removing software bugs, then programming must be the process of putting them in.

        ~E. W. Dijkstra

        W 1 Reply Last reply
        0
        • Pl45m4P Pl45m4

          @WWebber said in Custom widget debugging vs. designer.exe:

          I know, I can debug the custom widget itself, but not in combination with designer.exe.

          and you cant find anything wrong there?!

          One thing you could do is something like this:

          • https://stackoverflow.com/questions/35961043/qt-designer-crashes-with-custom-plugin

          TBH, I have not much experience in writing Qt Designer plugins but it seems that you need to handle every case, no matter how unlikely it might be.
          (Check for variable initialisation, nullpointers, indices and their limits, etc.).
          If QtDesigner finds an edge case while loading / initialising your plugin and it doesn't work, the Designer might crash.

          W Offline
          W Offline
          WWebber
          wrote on last edited by
          #8

          @Pl45m4
          Ok. But this is the way how we developed >30 Years ago! Try and error, adding debug outputs,.. but under MSDOS everything ran a lot faster ;) Thx. I will not waste any further time with it - was just a question.

          Pl45m4P 1 Reply Last reply
          0
          • W WWebber

            @Pl45m4
            Ok. But this is the way how we developed >30 Years ago! Try and error, adding debug outputs,.. but under MSDOS everything ran a lot faster ;) Thx. I will not waste any further time with it - was just a question.

            Pl45m4P Offline
            Pl45m4P Offline
            Pl45m4
            wrote on last edited by
            #9

            @WWebber said in Custom widget debugging vs. designer.exe:

            But this is the way how we developed >30 Years ago! Try and error, adding debug outputs

            But as you can see from the linked StackO post, the Designer plugin made Designer crash because it seemed that according to OP, the Designer passed unexpected parameters to a function which wasn't handled in the plugin and caused the crash


            If debugging is the process of removing software bugs, then programming must be the process of putting them in.

            ~E. W. Dijkstra

            Christian EhrlicherC 1 Reply Last reply
            0
            • Pl45m4P Pl45m4

              @WWebber said in Custom widget debugging vs. designer.exe:

              But this is the way how we developed >30 Years ago! Try and error, adding debug outputs

              But as you can see from the linked StackO post, the Designer plugin made Designer crash because it seemed that according to OP, the Designer passed unexpected parameters to a function which wasn't handled in the plugin and caused the crash

              Christian EhrlicherC Offline
              Christian EhrlicherC Offline
              Christian Ehrlicher
              Lifetime Qt Champion
              wrote on last edited by
              #10

              You can debug a designer plugin by using a designer executable built in debug mode - otherwise the application will not load the plugin (debug <-> release mismatch) - worked fine for me.

              Qt Online Installer direct download: https://download.qt.io/official_releases/online_installers/
              Visit the Qt Academy at https://academy.qt.io/catalog

              Pl45m4P 1 Reply Last reply
              1
              • Christian EhrlicherC Christian Ehrlicher

                You can debug a designer plugin by using a designer executable built in debug mode - otherwise the application will not load the plugin (debug <-> release mismatch) - worked fine for me.

                Pl45m4P Offline
                Pl45m4P Offline
                Pl45m4
                wrote on last edited by
                #11

                @Christian-Ehrlicher

                Just for me to know: But this cant be done when using the Designer from QtCreators Designer tab, right?! You have to build/compile Designer by yourself for that?! Or how to do this?


                If debugging is the process of removing software bugs, then programming must be the process of putting them in.

                ~E. W. Dijkstra

                Christian EhrlicherC 1 Reply Last reply
                0
                • Pl45m4P Pl45m4

                  @Christian-Ehrlicher

                  Just for me to know: But this cant be done when using the Designer from QtCreators Designer tab, right?! You have to build/compile Designer by yourself for that?! Or how to do this?

                  Christian EhrlicherC Offline
                  Christian EhrlicherC Offline
                  Christian Ehrlicher
                  Lifetime Qt Champion
                  wrote on last edited by
                  #12

                  @Pl45m4 When you have a debug version of QtCreator you can also do this in QtCreator.
                  QtCreator does not launch a new executable to show/edit the ui files so you have to debug QtCreator then.

                  Qt Online Installer direct download: https://download.qt.io/official_releases/online_installers/
                  Visit the Qt Academy at https://academy.qt.io/catalog

                  1 Reply Last reply
                  1
                  • W WWebber

                    Re: How to: Create custom designer widget using Visual Studio

                    Is there really no way to debug a custom widget when opened from designed.exe with visual studio?
                    There are certain situations, where custom widgets work perfectly, when dynmically created in a QT application, but the designer.exe crashes.

                    T Offline
                    T Offline
                    tataeress
                    wrote on last edited by
                    #13

                    @WWebber you will find your answer on how to debug it all in here
                    I tried it myself and it helped a looot
                    https://www.youtube.com/watch?v=CuDccvMWCcg

                    W 1 Reply Last reply
                    0
                    • T tataeress

                      @WWebber you will find your answer on how to debug it all in here
                      I tried it myself and it helped a looot
                      https://www.youtube.com/watch?v=CuDccvMWCcg

                      W Offline
                      W Offline
                      WWebber
                      wrote on last edited by
                      #14

                      @tataeress
                      ?
                      he does not explain how to debug my plugin hosted by designer.exe..

                      1 Reply Last reply
                      0

                      • Login

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