Results 1 to 7 of 7

Thread: Simple Mdi question

Threaded View

Previous Post Previous Post   Next Post Next Post
  1. #2
    Join Date
    Mar 2009
    Location
    Brisbane, Australia
    Posts
    7,729
    Thanks
    13
    Thanked 1,610 Times in 1,537 Posts
    Qt products
    Qt4 Qt5
    Platforms
    Unix/X11 Windows
    Wiki edits
    17

    Default Re: Simple Mdi question

    The grandparent of the first widget, if it exists, can be cast to QMdiArea to add another widget... or you can emit a signal and have the main window add the new child. The second option is more flexible, e.g. if the sub window widget is used standalone also.

    I don't know what you expect to happen when you call exec() on the child widget after adding it to the MDI area. The QDialog::exec() call is used to obtain a modal dialog, which is not particularly consistent with MDI, and breaks a simple test program on my machine.
    Last edited by ChrisW67; 21st September 2011 at 03:34.

  2. The following user says thank you to ChrisW67 for this useful post:

    slqh (21st September 2011)

Similar Threads

  1. Simple question
    By zorro68 in forum Qt Programming
    Replies: 2
    Last Post: 22nd February 2011, 12:42
  2. simple MVC question!
    By landonmkelsey in forum Qt Programming
    Replies: 14
    Last Post: 19th August 2008, 12:25
  3. A simple question
    By bruccutler in forum Newbie
    Replies: 1
    Last Post: 6th April 2007, 08:54
  4. simple question
    By mickey in forum Newbie
    Replies: 2
    Last Post: 20th June 2006, 10:39
  5. Another simple question...
    By Dark_Tower in forum Newbie
    Replies: 5
    Last Post: 31st March 2006, 16:13

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.