Resizing QmdiArea or QVBoxLayout within mainmenu

  • Hi,
    I am using QT Creator 5.2.1
    I am using the graphical form designer.
    I drop a QmdiArea onto the main form, and compile and run.
    When I resize the main form, the mdi area does not resize with it.
    I put a vertical layout box on the form, and dropped the mdi area into it.
    Again, the layout box and mdi are does not resize with the main window.
    I've looked at the settings in the object inspector, read a lot online, watched a few tutorials,
    and haven't uncovered why.

    I looked at the mdi example, and added a QmdiArea to my main form textually.
    this worked fine.

    can someone explain what i need to do in the graphical environment to get it to work?

  • Assuming your "main form" is a QMainWindow then you need to apply a layout to the QMainWindow's centralWidget (after putting something in it). Look at the central widget entry in the Designer Object Inspector panel. It will have a crossed-out layout icon. Select the central widget then use one of the layout tool buttons on the tool bar.

  • ChrisW67:

    Thank you for your help, you wouldn't believe how long I have been trying to solve this. wow, is this an unintuitive method.

Log in to reply