Qt Forum

    • Login
    • Search
    • Categories
    • Recent
    • Tags
    • Popular
    • Users
    • Groups
    • Search
    • Unsolved

    Resizing QmdiArea or QVBoxLayout within mainmenu

    General and Desktop
    2
    3
    999
    Loading More Posts
    • 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.
    • S
      SLaska last edited by

      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?

      1 Reply Last reply Reply Quote 0
      • C
        ChrisW67 last edited by

        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.
        http://qt-project.org/doc/qt-5/designer-layouts.html#setting-a-top-level-layout

        1 Reply Last reply Reply Quote 0
        • S
          SLaska last edited by

          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.

          1 Reply Last reply Reply Quote 0
          • First post
            Last post