Results 1 to 3 of 3

Thread: Wish to have a QMdiSubWindow window larger than the QMdiArea

Threaded View

Previous Post Previous Post   Next Post Next Post
  1. #1
    Join Date
    Apr 2010
    Posts
    18
    Thanked 1 Time in 1 Post
    Qt products
    Qt4
    Platforms
    Unix/X11 Windows

    Default Wish to have a QMdiSubWindow window larger than the QMdiArea

    Hello,

    I wondered if anybody could help me with my problem. I wish to be able to set the initial size of my sub window widget to some specific value. I have achieved this by overriding the sizeHint method in my class (which is derived from QWidget).

    This works fine except when the required initial size for the sub window is greater than the initial size of the main window (and therefore the mdi area). Under this circumstance Qt always resizes the sub window to fit within the main window. This is not want I want. I need the sizeHint of the widget to be honoured so that the sub window is larger than the mdi area. I have set the scroll bar policy of the mdi area to be "Qt::ScrollBarAsNeeded", but this does not fix the problem. Setting the size policy of the sub window widget to "Minimum" allows the sub window to be larger than the mdi area, but unfortunately the user cannot then manually resize the sub window to be some smaller size.

    I have been wrestling with this problem in one form or another for about four months now. Initially my application was an SDI application and I had a similar problem with it. I worked round it my employing a scrollarea to hold my widget, but this was not an ideal solution for various reasons. I therefore decided to go MDI believing that I would not have the same restrictions. But I seem to be wrong. I am finding working with this aspect of Qt to be very frustrating. Maybe, I will give up on Qt and use Mono instead, I am that fed up with it.

    I would really appreciate some help! Thanks.

  2. The following user says thank you to zenzero-2001 for this useful post:

    mvidelgauz (13th June 2014)

Similar Threads

  1. Replies: 2
    Last Post: 13th May 2010, 17:46
  2. QMdiArea window needs two clicks to close
    By epsilon in forum Qt Programming
    Replies: 2
    Last Post: 2nd March 2010, 06:08
  3. Weird behavior when readding a window to a QMdiArea
    By seand in forum Qt Programming
    Replies: 0
    Last Post: 27th August 2008, 02:14
  4. QMdiSubWindow closes main window
    By frido in forum Qt Programming
    Replies: 1
    Last Post: 25th July 2008, 10:54
  5. QMdiSubWindow problem with resized window
    By estanisgeyer in forum Qt Programming
    Replies: 2
    Last Post: 7th January 2008, 14:39

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.