PDA

View Full Version : MDI design question



mooreaa
3rd July 2008, 06:55
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?

Antebios
1st August 2008, 06:06
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.

mooreaa
1st August 2008, 22:31
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

freelucas
22nd February 2010, 17:14
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?

uj
22nd February 2010, 19:54
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?

freelucas
23rd February 2010, 09:40
Any more detail?
What kind of dock window? QDockWidget?
Where should the dock window be docked to?

Thanks a lot!

uj
23rd February 2010, 10:21
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.

freelucas
23rd February 2010, 15:23
I think the better way is to change the source code of QMDISubWindow to let it have some feathers of QDockWidget.

Litlington
8th April 2011, 10:42
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.