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. Using Qt designer to create widgets.
Qt 6.11 is out! See what's new in the release blog

Using Qt designer to create widgets.

Scheduled Pinned Locked Moved Unsolved General and Desktop
8 Posts 6 Posters 1.8k Views 2 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.
  • T Offline
    T Offline
    thisisdavid
    wrote on last edited by
    #1

    Hello,

    I'm currently working on a project as an introduction to Qt. I am now familiar with Qt designer and have made a couple of UI forms. In one of my UI forms, I was able to use other UI forms with a QStackedWidget.

    So I was wondering since I was able to use the UI form as a widget, would it be correct to create/design simple widgets using Qt designer? I mainly want to do this because it's much easier to design the widget with Qt designer's drag and drop feature (lol).

    Thanks.

    Venkatesh VV J.HilkJ 2 Replies Last reply
    0
    • T thisisdavid

      Hello,

      I'm currently working on a project as an introduction to Qt. I am now familiar with Qt designer and have made a couple of UI forms. In one of my UI forms, I was able to use other UI forms with a QStackedWidget.

      So I was wondering since I was able to use the UI form as a widget, would it be correct to create/design simple widgets using Qt designer? I mainly want to do this because it's much easier to design the widget with Qt designer's drag and drop feature (lol).

      Thanks.

      Venkatesh VV Offline
      Venkatesh VV Offline
      Venkatesh V
      wrote on last edited by
      #2

      @thisisdavid

      Hi
      If you are comfortable to use then you can use, there is no problem with it.

      1 Reply Last reply
      3
      • T thisisdavid

        Hello,

        I'm currently working on a project as an introduction to Qt. I am now familiar with Qt designer and have made a couple of UI forms. In one of my UI forms, I was able to use other UI forms with a QStackedWidget.

        So I was wondering since I was able to use the UI form as a widget, would it be correct to create/design simple widgets using Qt designer? I mainly want to do this because it's much easier to design the widget with Qt designer's drag and drop feature (lol).

        Thanks.

        J.HilkJ Offline
        J.HilkJ Offline
        J.Hilk
        Moderators
        wrote on last edited by
        #3

        @thisisdavid said in Using Qt designer to create widgets.:

        Hello,

        I'm currently working on a project as an introduction to Qt. I am now familiar with Qt designer and have made a couple of UI forms. In one of my UI forms, I was able to use other UI forms with a QStackedWidget.

        So I was wondering since I was able to use the UI form as a widget, would it be correct to create/design simple widgets using Qt designer? I mainly want to do this because it's much easier to design the widget with Qt designer's drag and drop feature (lol).

        Thanks.

        There is nothing wrong with that! I do a good amount of my ui in sub-designer classes.

        From personal experience:
        If you come back a few month later to your project, than it is much easier to understand what one coded, if a ui-designer class is at hand!


        Be aware of the Qt Code of Conduct, when posting : https://forum.qt.io/topic/113070/qt-code-of-conduct


        Q: What's that?
        A: It's blue light.
        Q: What does it do?
        A: It turns blue.

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

          Hi
          Note that when designing in Creator, c++ code is generated.
          So even when you need it for code ( like dynamic adding)
          you can go into setupUI() and get the code and tweak it.
          win-win :)

          jsulmJ 1 Reply Last reply
          4
          • mrjjM mrjj

            Hi
            Note that when designing in Creator, c++ code is generated.
            So even when you need it for code ( like dynamic adding)
            you can go into setupUI() and get the code and tweak it.
            win-win :)

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

            @mrjj Tweak setupUI()? I would not do that as all your changes will be lost next time the code is generated again.

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

            mrjjM 1 Reply Last reply
            2
            • EddyE Offline
              EddyE Offline
              Eddy
              wrote on last edited by
              #6

              @jsulm good point

              You might copy the parts of the generated code and paste it in another file.

              Qt Certified Specialist
              www.edalsolutions.be

              jsulmJ 1 Reply Last reply
              1
              • EddyE Eddy

                @jsulm good point

                You might copy the parts of the generated code and paste it in another file.

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

                @Eddy Sure. I just wanted to point out that one should not change generated code.

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

                1 Reply Last reply
                3
                • jsulmJ jsulm

                  @mrjj Tweak setupUI()? I would not do that as all your changes will be lost next time the code is generated again.

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

                  @jsulm
                  No, take the code. :)

                  As I write "and get the code and tweak it."

                  So i hope it dont sounds like fiddling in the file as that is futile as you say.
                  I will make sure to include "copy the code" in such statements as if u can read it the other way
                  then others can too.

                  But its very easy way to make complex layout in layout and get the code for free.

                  1 Reply Last reply
                  4

                  • Login

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