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. Resizing QmdiArea or QVBoxLayout within mainmenu

Resizing QmdiArea or QVBoxLayout within mainmenu

Scheduled Pinned Locked Moved General and Desktop
3 Posts 2 Posters 1.2k 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.
  • S Offline
    S Offline
    SLaska
    wrote on last edited by
    #1

    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
    0
    • C Offline
      C Offline
      ChrisW67
      wrote on last edited by
      #2

      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
      0
      • S Offline
        S Offline
        SLaska
        wrote on last edited by
        #3

        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
        0

        • Login

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