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. Some questions about the Qt designer

Some questions about the Qt designer

Scheduled Pinned Locked Moved Unsolved General and Desktop
5 Posts 3 Posters 476 Views 1 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
    Alby
    wrote on last edited by Alby
    #1

    Hello,

    After a long time I'm starting to use Qt again, and in particular I'm going over the Qt Designer, which is the tool that Qt has for facilitating the layout, style and properties of the various widgets, the one you find by clicking on the file with the ".ui" extension.

    I was doing some testing when a few questions arose:

    1)
    Is it possible to dynamically create a series of widgets? Example:
    A window with:

    • button
    • input text
      you enter a quantity in the input text and when you click the button, a number of widgets are created.

    2)
    Let's imagine this case: I have a menu with 3 buttons:
    "Home"
    "Info"
    "Other".

    Depending on which button is clicked, a new section opens in the main window; in each section there is an additional button to return to the section with the 3 buttons.

    To do this, I thought of creating groupings (the sections I'm talking about), in these groupings are my widgets, and for each button is associated a function that hides all sections except the one concerned.

    I don't know if this approach is the best, and I don't know what the widget for grouping multiple widgets is called.

    M 1 Reply Last reply
    0
    • A Alby

      Hello,

      After a long time I'm starting to use Qt again, and in particular I'm going over the Qt Designer, which is the tool that Qt has for facilitating the layout, style and properties of the various widgets, the one you find by clicking on the file with the ".ui" extension.

      I was doing some testing when a few questions arose:

      1)
      Is it possible to dynamically create a series of widgets? Example:
      A window with:

      • button
      • input text
        you enter a quantity in the input text and when you click the button, a number of widgets are created.

      2)
      Let's imagine this case: I have a menu with 3 buttons:
      "Home"
      "Info"
      "Other".

      Depending on which button is clicked, a new section opens in the main window; in each section there is an additional button to return to the section with the 3 buttons.

      To do this, I thought of creating groupings (the sections I'm talking about), in these groupings are my widgets, and for each button is associated a function that hides all sections except the one concerned.

      I don't know if this approach is the best, and I don't know what the widget for grouping multiple widgets is called.

      M Offline
      M Offline
      mpergand
      wrote on last edited by mpergand
      #2

      Hi,

      @Alby said in Some questions about the Qt designer:

      Is it possible to dynamically create a series of widgets?

      I don't thing so.

      I thought of creating groupings (the sections I'm talking about), in these groupings are my widgets, and for each button is associated a function that hides all sections except the one concerned.

      It's called QStackedWidget

      A JonBJ 2 Replies Last reply
      0
      • M mpergand

        Hi,

        @Alby said in Some questions about the Qt designer:

        Is it possible to dynamically create a series of widgets?

        I don't thing so.

        I thought of creating groupings (the sections I'm talking about), in these groupings are my widgets, and for each button is associated a function that hides all sections except the one concerned.

        It's called QStackedWidget

        A Offline
        A Offline
        Alby
        wrote on last edited by
        #3

        @mpergand , Thank you

        1 Reply Last reply
        0
        • M mpergand

          Hi,

          @Alby said in Some questions about the Qt designer:

          Is it possible to dynamically create a series of widgets?

          I don't thing so.

          I thought of creating groupings (the sections I'm talking about), in these groupings are my widgets, and for each button is associated a function that hides all sections except the one concerned.

          It's called QStackedWidget

          JonBJ Online
          JonBJ Online
          JonB
          wrote on last edited by
          #4

          @mpergand said in Some questions about the Qt designer:

          Is it possible to dynamically create a series of widgets?

          I don't thing so.

          Pardon? @Alby you can dynamically create any widgets at runtime if you wish (e.g. in response to a button being pressed) by just newing them and attaching them to wherever. The (code generated from the) .ui file does this anyway, but is intended only for when all your widgets are pre-designed/added in advance at design-time.

          M 1 Reply Last reply
          0
          • JonBJ JonB

            @mpergand said in Some questions about the Qt designer:

            Is it possible to dynamically create a series of widgets?

            I don't thing so.

            Pardon? @Alby you can dynamically create any widgets at runtime if you wish (e.g. in response to a button being pressed) by just newing them and attaching them to wherever. The (code generated from the) .ui file does this anyway, but is intended only for when all your widgets are pre-designed/added in advance at design-time.

            M Offline
            M Offline
            mpergand
            wrote on last edited by
            #5

            @JonB said in Some questions about the Qt designer:

            you can dynamically create any widgets at runtime

            My understanding was if it is possible inside QDesigner.
            Because by code you can do what you want of course.

            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