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. StackWidget objects in qt designer not resizing
Forum Updated to NodeBB v4.3 + New Features

StackWidget objects in qt designer not resizing

Scheduled Pinned Locked Moved Unsolved General and Desktop
7 Posts 3 Posters 556 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.
  • L Offline
    L Offline
    LT-K101
    wrote on last edited by LT-K101
    #1

    I'm using a StackedWidget packed with objects such as linEdits,comboBoxes and labels in main window. I want the objects in the StackedWidget to fill up the space when I maximize the mainwindow as I arranged them originally. But when I used all the layouts in Qt designer it reposition the objects in a different manner which is not the way i arranged the objects. I'm really struggling with this please any help would be appreciated. Thank you.

    jsulmJ S 2 Replies Last reply
    0
    • L LT-K101

      I'm using a StackedWidget packed with objects such as linEdits,comboBoxes and labels in main window. I want the objects in the StackedWidget to fill up the space when I maximize the mainwindow as I arranged them originally. But when I used all the layouts in Qt designer it reposition the objects in a different manner which is not the way i arranged the objects. I'm really struggling with this please any help would be appreciated. Thank you.

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

      @LT-K101 said in StackWidget objects in qt designer not resizing:

      please any help would be appreciate

      Well, with this information it is hard to help.
      Please post a screen-shot of your widget in designer.
      And also screen-shot of what you get.

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

      L 1 Reply Last reply
      1
      • jsulmJ jsulm

        @LT-K101 said in StackWidget objects in qt designer not resizing:

        please any help would be appreciate

        Well, with this information it is hard to help.
        Please post a screen-shot of your widget in designer.
        And also screen-shot of what you get.

        L Offline
        L Offline
        LT-K101
        wrote on last edited by
        #3

        @jsulm Thanks for your response.

        1. Below is the image of the designer screen

        A.png

        1. The second image shows the full screen. But it does not fill up the whole StackedWidget
          B.png
        jsulmJ 1 Reply Last reply
        0
        • L LT-K101

          @jsulm Thanks for your response.

          1. Below is the image of the designer screen

          A.png

          1. The second image shows the full screen. But it does not fill up the whole StackedWidget
            B.png
          jsulmJ Offline
          jsulmJ Offline
          jsulm
          Lifetime Qt Champion
          wrote on last edited by
          #4

          @LT-K101 You added a QWidget to your QStackedWidget, but it looks like you did not put its children in a layout.

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

          L 1 Reply Last reply
          1
          • jsulmJ jsulm

            @LT-K101 You added a QWidget to your QStackedWidget, but it looks like you did not put its children in a layout.

            L Offline
            L Offline
            LT-K101
            wrote on last edited by LT-K101
            #5

            @jsulm Please are the children referring to the LineEdits and ComboBoxes? If yes when I add a layout to the children, the current positions changes but I would like to maintain the current positions of children.

            jsulmJ 1 Reply Last reply
            0
            • L LT-K101

              @jsulm Please are the children referring to the LineEdits and ComboBoxes? If yes when I add a layout to the children, the current positions changes but I would like to maintain the current positions of children.

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

              @LT-K101 yes

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

              1 Reply Last reply
              0
              • L LT-K101

                I'm using a StackedWidget packed with objects such as linEdits,comboBoxes and labels in main window. I want the objects in the StackedWidget to fill up the space when I maximize the mainwindow as I arranged them originally. But when I used all the layouts in Qt designer it reposition the objects in a different manner which is not the way i arranged the objects. I'm really struggling with this please any help would be appreciated. Thank you.

                S Offline
                S Offline
                SimonSchroeder
                wrote on last edited by
                #7

                @LT-K101 said in StackWidget objects in qt designer not resizing:

                But when I used all the layouts in Qt designer it reposition the objects in a different manner which is not the way i arranged the objects.

                I have to disagree here. When you don't use a layout, the position of widgets is in relation to the top left of the widget they are contained in: The spacing between the widgets stays the same in your full screen view, and also their relative position in relation to the top and the left.

                I am not entirely sure what you are trying to achieve or why a layout would break the thing you are trying to achieve. With the way things are layout in Qt Designer right now, I would just apply a grid layout to the parent widget (I believe this is a little complicated with a stacked widget; you might have to select the correct widget in the Object Inspector on the right to apply the layout).

                If you want some space between some of the widgets, add horizontal or vertical spacers (they can be found almost at the top of the list on the left). I tend to use horizontal spacers with a fixed width of 20 pixels from time to time.

                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