PDA

View Full Version : QMainWindow dockable



Alundra
8th February 2015, 00:38
Hi all,
I have multipke QMainWindow in my application, all works fine but I would add one feature if Qt can handle it.
The feature I would add is dockable window, to switch from one window to another in the same window.
One example is showed here :
http://staraban.com/wp-content/uploads/2014/03/unreal-engine-4-blueprint-editor.jpg
You can see on the top, window can be switched and closed, like QDockWidget one on another.
Is it possible in Qt ? How can I do that ?
Thanks for the help

jefftee
8th February 2015, 02:24
Have you looked at the QMdiArea class? Would that meet your needs?

Alundra
8th February 2015, 04:56
I looked on it and i'm not sure if that's what I need, here what I need :
- Multiple window dockable or movable outside like when you drop a QDockWidget on another one, that create a tab.
- The main window contains one sub-window which is not closable and not undockable.
- Each sub-window can dock sub-window like the main window.
- If the last sub-window docked is closed, close the window.
QMdiArea can does all that ?

Alundra
8th February 2015, 15:53
I tried MDI Example and when I maximize one window I can see other in a tabbar, which gives a switch of window not easy.
One other problem I see in MDI example is the window can not be outside of the main window.

Alundra
9th February 2015, 02:03
Apparently using tabview the tab is visible :
https://bugreports.qt.io/secure/attachment/32026/TabviewArtifact.PNG
The only problem is when the window is floating to have it movable outside the main window and having it dockable on other MDI window.