Results 1 to 3 of 3

Thread: MdiArea in centralWidget -> many mdiSubwindows resize MainWindow

  1. #1
    Join Date
    Jul 2015
    Posts
    87
    Thanks
    1
    Thanked 4 Times in 4 Posts
    Qt products
    Qt5
    Platforms
    Windows

    Default MdiArea in centralWidget -> many mdiSubwindows resize MainWindow

    Hello,

    i have in my centralWidget a QMdiArea. When i open many files (30) i got in
    Window mode many windows, thats ok.
    When i now switch from "cascade" to "tile" the mainwindow resizes and is
    much bigger than my screen.

    How can i prevent a resize of the mainwindow if i activate "tile" view of
    many windows in a mdiAdea?

    i tried this, but didn't work:
    Qt Code:
    1. void MainWindow::resizeEvent(QResizeEvent *event)
    2. {
    3. ui->centralWidget->setMaximumHeight(geometry().height());
    4. ui->centralWidget->setMaximumWidth(geometry().width());
    5. }
    To copy to clipboard, switch view to plain text mode 

    Thx

  2. #2
    Join Date
    Jul 2008
    Location
    Germany
    Posts
    518
    Thanks
    13
    Thanked 77 Times in 75 Posts
    Qt products
    Qt4 Qt5
    Platforms
    Unix/X11 Windows

    Default Re: MdiArea in centralWidget -> many mdiSubwindows resize MainWindow

    Hi, do you have a minimum size for your MDI subwindows?

    Ginsengelf

  3. #3
    Join Date
    Jul 2015
    Posts
    87
    Thanks
    1
    Thanked 4 Times in 4 Posts
    Qt products
    Qt5
    Platforms
    Windows

    Default Re: MdiArea in centralWidget -> many mdiSubwindows resize MainWindow

    No. The widget "ui_graph_window" will be used in every mdiSubWindow.
    The mdiSubWindow has no miniminSize and the "ui_graph_window.ui" also.

Similar Threads

  1. resize tableview when resizing mainwindow
    By AlstomATS in forum Newbie
    Replies: 1
    Last Post: 12th September 2013, 09:43
  2. Replies: 0
    Last Post: 21st November 2011, 07:55
  3. MdiSubWindows
    By DmitryNik in forum Newbie
    Replies: 6
    Last Post: 28th September 2011, 11:46
  4. MainWindow won't resize, why does this work?
    By weevil in forum Qt Programming
    Replies: 1
    Last Post: 20th June 2010, 07:08
  5. Replies: 4
    Last Post: 4th December 2009, 10:04

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
Qt is a trademark of The Qt Company.