Dock user area using Qt 4.4

Is it possible to create custom dock areas using Qt 4.4. I know this is possible in Qt 3, as the document suggests . Excerpt from the document "... If you need to create your own docking areas, we suggest creating a QWidget subclass and adding Q3DockAreas to your subclass ...". However, it seems to me that Q3DockArea has been removed in Qt 4, and now QMainWindow itself has docking areas. I basically want to have my own dock area widget in which I can connect widgets. This dock area widget can be anywhere in the application. Any ideas on how I can do this?

+3
source share
1 answer

At first, Q3DockArea was not removed in Qt4, in fact it was added. The class that was deleted was QDockArea. You can use these Q3 * classes if you have old code, why they were created.

But I would not recommend using compatibility classes. How about using QMainWindow as a QWidget. Create it with the parent widgets, but without the menu, toolbar, status bar and cancel the top-level status using setWindowFlags (), etc.

You can use it as the old QDockArea style, put it where you want, and add QDockWidgets.

In addition, the current version of Qt is 4.5.2, you do not need to use outdated versions; -)

+4
source

Source: https://habr.com/ru/post/1715102/


All Articles