Results 1 to 1 of 1

Thread: QMdiArea subwindow size always minimized

  1. #1
    Join Date
    Jan 2011
    Posts
    19
    Qt products
    Qt4
    Platforms
    Windows

    Default QMdiArea subwindow size always minimized

    I currently have a QMainWindow with a QMdiArea as the central widget. I have a method that adds a subwindow to the QMdiArea. When it appears, it's width and height are always at it's minimum value (you only see the icon and Min,Max,Close buttons). The subwindow that is being added is a qwidget with a size of 640x480 which is sized with resize() in its constructor. I thought this would size the QSubWindow to the size of that widget but it does not work. Why is this?

    Only setting specific numbers works by getting a handle on the currentSubWindow: mdiArea->currentSubWindow()->resize( 640, 480 );

    EDIT: It seems that the widget that you add to the subwindow is resized to something like 111, -18. Any suggestions on how to get the subwindow size to be the size of its internal widget?

    EDIT: I've found an acceptable solution. Use setMinimumSize and call adjustSize. https://bugreports.qt-project.org/browse/QTBUG-5825
    Last edited by Plissken; 15th July 2012 at 22:58.

Similar Threads

  1. QMdiArea: Maximaized SubWindow in background?
    By JohnnyRep in forum Qt Programming
    Replies: 4
    Last Post: 23rd March 2012, 18:19
  2. QMdiArea / SubWindow Problem
    By ericV in forum Qt Programming
    Replies: 2
    Last Post: 19th September 2009, 00:09
  3. QMdiArea/SubWindow issue...
    By b1 in forum Qt Programming
    Replies: 3
    Last Post: 2nd September 2009, 08:22
  4. QMdiArea how to connect the subwindow changed
    By SamSong in forum Qt Programming
    Replies: 3
    Last Post: 21st May 2009, 02:15
  5. Start Minimized
    By December in forum Qt Programming
    Replies: 2
    Last Post: 20th October 2007, 07:02

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
  •  
Digia, Qt and their respective logos are trademarks of Digia Plc in Finland and/or other countries worldwide.