Results 1 to 3 of 3

Thread: Advice Req: Moving MDI GUI to SDI with Auxiliary Windows

  1. #1
    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

    Question Advice Req: Moving MDI GUI to SDI with Auxiliary Windows

    I'm in the throws of redeveloping a VB3 (Yes! VB3) application into Qt. The original app is an MDI GUI layout: there's only a single document open, but multiple MDI child windows present different views on the same data. One of the child windows is the master view; closing it closes the application. The other views (child windows) are opened and closed on demand, and most have a corresponding print version. Maximising a child window maximises them all, which is ugly for windows that have a natural small size.

    I'd like to rearrange the Qt version to have a QMainWindow containing the master view, and separate sub-ordinate windows for the alternate views. Each alternate view should have a couple of actions (Close, Print and maybe others). I can see a few ways to do it;
    • A QMainWindow derivative for each subordinate view.
    • A modeless QDialog for each subordinate view.
    • A bare QWidget for each subordinate view
    Each subordinate view would be allocated on the heap, shown, and hidden/destroyed as required. The first option gives me menus and toolbar support trivially. I'm not sure if the other ways can support a toolbar/menu.

    Is there some received wisdom on the "best" way to approach this?

    Cheers,
    Chris

  2. #2
    Join Date
    Jan 2006
    Location
    Frankfurt
    Posts
    500
    Thanks
    1
    Thanked 52 Times in 52 Posts
    Platforms
    MacOS X Unix/X11

    Default Re: Advice Req: Moving MDI GUI to SDI with Auxiliary Windows

    Dialog and widget do not make a big difference. I'd go either for mainwindow or widget. Take the mainwindow if you want to have more than one toolbar. You can add one toolbar to a widget quite easily using a box-layout. If you want to have more than one, designing them using Qt Designer is the way to go I think and then you will have to use a mainwindow.
    It's nice to be important but it's more important to be nice.

  3. The following user says thank you to axeljaeger for this useful post:

    ChrisW67 (20th October 2009)

  4. #3
    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: Advice Req: Moving MDI GUI to SDI with Auxiliary Windows

    After having a quick prototype I think the main window is the approach I'll take.

Similar Threads

  1. Replies: 3
    Last Post: 24th August 2009, 15:41
  2. Replies: 5
    Last Post: 15th January 2009, 10:03
  3. Newbie needs advice on moving to designer
    By nbkhwjm in forum Newbie
    Replies: 2
    Last Post: 12th April 2007, 00:32
  4. Multiple Windows -> Advice needed
    By vokal in forum Newbie
    Replies: 2
    Last Post: 8th January 2007, 09:40

Tags for this Thread

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.