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. Can't get my widget to auto-resize...
Forum Updated to NodeBB v4.3 + New Features

Can't get my widget to auto-resize...

Scheduled Pinned Locked Moved Solved General and Desktop
22 Posts 5 Posters 29.3k Views 5 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.
  • kshegunovK kshegunov

    The last one looks good (almost no problems). You have to set layouts to your group boxes too and everything will be resizing. Also bear in mind you don't really need a grid layout for the top widget, vertical one (with 2 items) should do just fine.

    Edit.
    Actually I took a closer look. I'd put the two groups in a nested horizontal layout, the dropdown with buttons in a vertical one. The vertical one and the text area in a horizontal one and set the root widget's layout to vertical.

    You can judge if there's a layout attached to the widget by looking at the object tree - the red crossed circle means there's no layout. Otherwise the assigned layout is shown as an icon. The child objects you see in the tree will be ordered according to the set layout. In practice using a nested layout isn't very often needed, only occasionally.

    mzimmersM Offline
    mzimmersM Offline
    mzimmers
    wrote on last edited by
    #21

    @kshegunov that's good information. This is now close to what I want:

    0_1507322977346_there.PNG

    I think this is close to what you suggested.

    So, the lesson learned here is, it isn't enough to simply have all the child objects in a layout -- you must have the parent widget itself in a layout. Correct?

    kshegunovK 1 Reply Last reply
    0
    • mzimmersM mzimmers

      @kshegunov that's good information. This is now close to what I want:

      0_1507322977346_there.PNG

      I think this is close to what you suggested.

      So, the lesson learned here is, it isn't enough to simply have all the child objects in a layout -- you must have the parent widget itself in a layout. Correct?

      kshegunovK Offline
      kshegunovK Offline
      kshegunov
      Moderators
      wrote on last edited by
      #22

      @mzimmers said in Can't get my widget to auto-resize...:

      I think this is close to what you suggested.

      Exactly what I had in mind. A small note here, for the SSID/PSK box you can use a form layout instead of a grid layout. Not much of a difference, just a matter of preference. You can also control how space is split between the layouts by going to the property editor (below the object tree) and setting the stretches.

      So, the lesson learned here is, it isn't enough to simply have all the child objects in a layout -- you must have the parent widget itself in a layout. Correct?

      Correct!

      Read and abide by the Qt Code of Conduct

      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