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. stack widget in qt designer not resizing

stack widget in qt designer not resizing

Scheduled Pinned Locked Moved Solved General and Desktop
5 Posts 3 Posters 2.3k 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.
  • P Offline
    P Offline
    Puppy Bear
    wrote on 9 Nov 2021, 06:00 last edited by
    #1

    I'm using a stack widget to create a changeable area in main window, however I've troubled with stack widget not resizing itself according the layout outside.
    The picture shows that once I put a layout inside the stack widget and change the layout outside's size, they wouldn't grow together, which means when the window get smaller, they conceal themselves behind the outside layout, and would get to wrong position once I enlarge the window.
    alt textI]EH68K$WEKDNGRU6AUW.png image url)

    J 1 Reply Last reply 9 Nov 2021, 06:32
    0
    • P Puppy Bear
      9 Nov 2021, 06:00

      I'm using a stack widget to create a changeable area in main window, however I've troubled with stack widget not resizing itself according the layout outside.
      The picture shows that once I put a layout inside the stack widget and change the layout outside's size, they wouldn't grow together, which means when the window get smaller, they conceal themselves behind the outside layout, and would get to wrong position once I enlarge the window.
      alt textI]EH68K$WEKDNGRU6AUW.png image url)

      J Offline
      J Offline
      jsulm
      Lifetime Qt Champion
      wrote on 9 Nov 2021, 06:32 last edited by jsulm 11 Sept 2021, 06:32
      #2

      @Puppy-Bear Your main window does not have a layout.
      Right-click on an empty space in your main window (not inside red layouts!), then click on "Lay out" and then on one of the layouts.

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

      1 Reply Last reply
      1
      • P Offline
        P Offline
        Puppy Bear
        wrote on 10 Nov 2021, 00:52 last edited by
        #3

        Thanks for the help, but I have tried right clicked on main window and set it with horizontal layout, the problem still remains , the stack widget and layout outside itself could change with the window's size, but the layout inside this widget wouldn't change(rightest position in the picture), it's neither changing size nor changing ratio according to the window
        and the windows' size remains unchangeable. It seems that I am not able to run the UI in full screen for some reason.

        ![0cf61ef3-de9f-4852-b8e1-bcc02daa682c-X@6~}MM7`U(TR9N0EFI(]C.png](https://ddgobkiprc33d.cloudfront.net/58325d0c-1185-4850-a6b8-2cdf9b09b393.png)
        ![d19554be-8702-4e60-be63-eab1c4a8fbd9-3@E2PU14K1{}`CWWM{8NT35.png

        ![8b6d0c8e-f3c0-49c5-babc-07259762783d-1SK(PAHD9~0TWTPL2GKT`3.png

        B 1 Reply Last reply 10 Nov 2021, 02:06
        0
        • P Puppy Bear
          10 Nov 2021, 00:52

          Thanks for the help, but I have tried right clicked on main window and set it with horizontal layout, the problem still remains , the stack widget and layout outside itself could change with the window's size, but the layout inside this widget wouldn't change(rightest position in the picture), it's neither changing size nor changing ratio according to the window
          and the windows' size remains unchangeable. It seems that I am not able to run the UI in full screen for some reason.

          ![0cf61ef3-de9f-4852-b8e1-bcc02daa682c-X@6~}MM7`U(TR9N0EFI(]C.png](https://ddgobkiprc33d.cloudfront.net/58325d0c-1185-4850-a6b8-2cdf9b09b393.png)
          ![d19554be-8702-4e60-be63-eab1c4a8fbd9-3@E2PU14K1{}`CWWM{8NT35.png

          ![8b6d0c8e-f3c0-49c5-babc-07259762783d-1SK(PAHD9~0TWTPL2GKT`3.png

          B Offline
          B Offline
          Bonnie
          wrote on 10 Nov 2021, 02:06 last edited by Bonnie 11 Oct 2021, 02:55
          #4

          @Puppy-Bear Hey, seems that your stacked widget's page still doesn't have a layout.
          So right-click in the stacked widget and choose a layout just like in the main window.
          (You need to do that for every page of the stacked widget.)
          A little tip: dragging a layout to an empty widget doesn't make it the widget's top-level layout so it will not be auto resized.
          I recommend to read this: Setting A Top Level Layout.
          So check this icon. fc23a544-ac43-42d3-a77b-98d2b6a68853.png It means the widget doesn't have a layout. If you have a widget with this icon and it has child widgets, then maybe something need to be fixed.

          P 1 Reply Last reply 10 Nov 2021, 05:39
          3
          • B Bonnie
            10 Nov 2021, 02:06

            @Puppy-Bear Hey, seems that your stacked widget's page still doesn't have a layout.
            So right-click in the stacked widget and choose a layout just like in the main window.
            (You need to do that for every page of the stacked widget.)
            A little tip: dragging a layout to an empty widget doesn't make it the widget's top-level layout so it will not be auto resized.
            I recommend to read this: Setting A Top Level Layout.
            So check this icon. fc23a544-ac43-42d3-a77b-98d2b6a68853.png It means the widget doesn't have a layout. If you have a widget with this icon and it has child widgets, then maybe something need to be fixed.

            P Offline
            P Offline
            Puppy Bear
            wrote on 10 Nov 2021, 05:39 last edited by
            #5

            @Bonnie Thanks! IT Exactly worked

            1 Reply Last reply
            0

            5/5

            10 Nov 2021, 05:39

            • Login

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