Results 1 to 9 of 9

Thread: MDI design question

  1. #1

    Default MDI design question

    I am wanting to do something like visual studio where I have one active solution, but many open documents associated with the project. How do I handle the "single project" vs multi document design?

    Also each document can be of different types IE might be a text file, or another might be a GraphicsView scene. Who/what handles the type of document? I presume this is the QMDISubWindow?

    If I make a document a QMDISubWindow, can I ever "float" or detach that window so that its can be displayed outside of the QMDIArea?

  2. #2
    Join Date
    Aug 2008
    Posts
    11
    Qt products
    Qt3 Qt4
    Platforms
    Unix/X11 Windows

    Default Re: MDI design question

    Quote Originally Posted by mooreaa View Post
    If I make a document a QMDISubWindow, can I ever "float" or detach that window so that its can be displayed outside of the QMDIArea?
    Please let me know if you've solved this? The only thing I can think of is putting the MdiArea inside of a another widget that it itself is the set central widget to the MainForm. Then, that way you can take windows out and not modify the mainwindow. Or, I could just be talking out of my ass.

    Let me know if you have found a solution.

  3. #3

    Default Re: MDI design question

    Hi there,

    Theres two parts to this issue. One is the functionality tied down to the MDI document. You want a hybrid of dock widget and mdi window to achieve some of the functionality.

    The other side is managing the documents. You really have to operate both the SDI and MDI at the same time. You want to store the active project and related settings probablly in main window.

    The child windows would ultimately be managed by the active project... IE you can close the project and that causes all child windows to be closed.

    Some of these things would be much easier to address from Trolltech's side. Especailly when trying to mix/match different systems I would think.

    One of the challenges with the MDI setup is that you can't ever float the window (like you can in photoshop outside of the mdi area).

    I'm still playing with single window apps at this point. Some of the signals/slots could get a bit confusing to manage with multiple levels to operate on and also with sdi/mdi ideas going on in one doc.

    Just my 2 cents

  4. #4
    Join Date
    Feb 2010
    Posts
    5
    Thanks
    1
    Qt products
    Qt4

    Default Re: MDI design question

    Quote Originally Posted by mooreaa View Post

    Some of these things would be much easier to address from Trolltech's side. Especailly when trying to mix/match different systems I would think.

    One of the challenges with the MDI setup is that you can't ever float the window (like you can in photoshop outside of the mdi area).
    Yes! I also want to know if it is possible to get a float subwindow like in photoshop.
    Any possibility in future Qt version?

  5. #5
    Join Date
    Jun 2009
    Posts
    22
    Thanks
    4
    Thanked 1 Time in 1 Post
    Qt products
    Qt4
    Platforms
    Windows

    Default Re: MDI design question

    Quote Originally Posted by freelucas View Post
    Yes! I also want to know if it is possible to get a float subwindow like in photoshop.
    Any possibility in future Qt version?
    Wouldn't it be possible to put a dock window in each of the MDI windows?

  6. #6
    Join Date
    Feb 2010
    Posts
    5
    Thanks
    1
    Qt products
    Qt4

    Default Re: MDI design question

    Any more detail?
    What kind of dock window? QDockWidget?
    Where should the dock window be docked to?

    Thanks a lot!

  7. #7
    Join Date
    Jun 2009
    Posts
    22
    Thanks
    4
    Thanked 1 Time in 1 Post
    Qt products
    Qt4
    Platforms
    Windows

    Default Re: MDI design question

    I can't help you with any details because I haven't started using Qt yet.

    But if the problem is that MDI windows are "stuck" within the main application window, then putting dockable windows withing the MDI windows would be a solution.

    After having briefly consulted C++ GUI Programming with Qt, it seems like my suggestion would require that a QMainWindow be put in each MDI window before a QDockWidget can be added. I don't have the faintest idea whether this will work but it may be worth investigating.

  8. The following user says thank you to uj for this useful post:

    freelucas (23rd February 2010)

  9. #8
    Join Date
    Feb 2010
    Posts
    5
    Thanks
    1
    Qt products
    Qt4

    Default Re: MDI design question

    I think the better way is to change the source code of QMDISubWindow to let it have some feathers of QDockWidget.

  10. #9
    Join Date
    Apr 2011
    Posts
    1
    Qt products
    Qt4
    Platforms
    Windows

    Default Re: MDI design question

    Floating an MDI window on the desktop: has anyone done this yet?

    We have done it with Visual C++ and MFC. It involved detaching the window from the its parent (in this case QMdiArea I guess) and attaching it to a new floating parent window. But first, to know that the user wants to float the window, it is necessary to detect that the window's tab is being dragged away from the other tabs.

    Now we would like to have the same feature with Qt.
    Last edited by Litlington; 8th April 2011 at 09:50.

Similar Threads

  1. Replies: 3
    Last Post: 4th April 2008, 19:51
  2. QTableWidget Design & Thread Safety Question
    By bpetty in forum Qt Programming
    Replies: 4
    Last Post: 28th March 2008, 00:09
  3. Client-Server software project design question
    By MarkoSan in forum Qt Programming
    Replies: 7
    Last Post: 25th March 2008, 09:31
  4. A question of style and design
    By Kumosan in forum General Programming
    Replies: 7
    Last Post: 16th March 2007, 09:34
  5. Dialog and code design issue
    By Gopala Krishna in forum Qt Programming
    Replies: 1
    Last Post: 24th September 2006, 17:54

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.