PDA

View Full Version : A multi-windowed application with Qt



ouekah
13th April 2010, 10:18
Hi,

I would like to develop a multi-windowed application using Qt (like adobe illustrator, photoshop, or pixelmator...), but I don't know how to proceed.

Usually for a standard application one just needs to create a QMainWindow and then to add QWidgets in this main window. However to my understanding this is not the same in a multi-windowed application since there are multiple windows at the same time.

So I have two questions:

1) Am I right ?
2) Are there specific widgets for multi-windowed applications ?

JohannesMunk
13th April 2010, 11:24
I'm not sure what you are trying to achieve.

Look at: http://doc.trolltech.com/latest/mainwindows-mdi.html

It has a TabbedViewMode too: QMdiArea.setViewMode(QMdiArea::TabbedView);

Johannes

ouekah
13th April 2010, 12:09
Thanks for your help ! This is almost what I'm looking for. But if I refer to your example, I would like the "MDI" window to not be visible. This would give the impression to the user that "main.cpp" and "document1.txt" are two independent windows. Another example of what I'm looking for is adobe photoshop where the window containing the picture and another window containing the tools are separated and visibly not contained in any main window.

Of course there should be a main layout in which these windows are contained. However I would like this layout to be invisible.

Is there a way to do that ?

spud
13th April 2010, 12:33
Have a look at Qt designer. Choose Settings->Preferences->User Interface Mode->Multiple Top Level Windows.

I'm not sure how they have implemented this, but you can have a look in the sources yourself.

JD2000
13th April 2010, 15:44
Don't you just create a parentless window / dialogue / widget to achieve this effect?