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. Resize subwindows based on mdiArea window size
Qt 6.11 is out! See what's new in the release blog

Resize subwindows based on mdiArea window size

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

    I have an MdiArea mainDisplay inside which i have defined two subwindow. However, I want the subwindows to resize whenever my mainwindow is resized. These are all embedded inside my mainwindow's central widget. i want the contents to resize whenever my mainwindow is resized

    @mainDisplay= new QMdiArea;//main menu mdi area
    subwindow1= new QMdiSubWindow;//screen contains pattern catalogue
    subwindow1->setWidget(scrollregion);
    subwindow1->setMinimumSize(250,700);
    mainDisplay->addSubWindow(subwindow1);
    subwindow3= new QMdiSubWindow;//screen containing the texture
    subwindow3->setMinimumSize(1100,700);
    subwindow3->setGeometry(250,0,1000,700);
    mainDisplay->addSubWindow(subwindow1);
    mainDisplay->addSubWindow(subwindow3);
    subwindow3->hide();
    setCentralWidget(mainDisplay);@

    1 Reply Last reply
    0
    • Z Offline
      Z Offline
      zeljko
      wrote on last edited by
      #2

      Maybe you can do that in resize event of QMdiArea.

      1 Reply Last reply
      0
      • S Offline
        S Offline
        sunil.nair
        wrote on last edited by
        #3

        Okay, so I need to to get the size value on resize event ans set the geometry accordingly. Thanks. I was thinking if there was a more direct way?

        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