Hi Friends,
I have to create a custom layout for my main application. Layout can be of different type as:
|--------------------------------------|
| | | |
| 2 | | 4 |
|-----| 1 |-----|
| |-----------| |
| 3 | 7 | 5 |
|-----------------------|
| 6 |
|-----------------------|
|--------------------------------------|
| | | |
| 2 | | 4 |
|-----| 1 |-----|
| |-----------| |
| 3 | 7 | 5 |
|-----------------------|
| 6 |
|-----------------------|
To copy to clipboard, switch view to plain text mode
Here all no's(1...) are the dockwidgets. But I am facing following problems to do so:
1) As DockWidgetAreas have only the following layout option:
Qt::LeftDockWidgetArea
Qt::RightDockWidgetArea
Qt::TopDockWidgetArea
Qt::BottomDockWidgetArea
Qt::AllDockWidgetAreas
Qt::NoDockWidgetArea
then how can I add the position for other windows.
2) Positioning of the 'QDockWidget': When I am positioning the docs using the move and resize functions then it does not work properly.
Note:
I have done the following try:
Try 1: I have tried the sizeHint() and save/load geometry but it does not worked.
Try 2: I have tried the layout on centerwidget using splitter and gridlayout but it does not give me the proper docking feature as the dock-widgets was the child of centerwidget. I am facing the following problem in this:
- Unable to auto dock in the another dock area while moving the window as dock feature.
- While undocking window moves up.
Please provide me some idea or solution on this issue....I have attached the zip file for the "Try 2"
or
Is there any way to do this by removing center widget and add dock directly to the main window in the specified layout.
It will be very helpful for me if you work on the attached examples.
Compiler Used: Visual Studio [GCC will also work but not tested]
Thanks in advance...
Bookmarks