I am writing an application on Qt, you need to use a widget that allows you to create multiple tabs, move a tab outside the application window and, thus, work with two tabs at the same time. As I understood, reading the documentation, QTabWidget does not allow this. Is there another ready-made widget? Or you need to write yourself, then what methods need to override?
|
2 answers
LXA says it right. Unless QDockWidget , instead of DockWidget.
Allows you to easily create separate windows that are attached to specific areas of the window QMainWindow ( QDockArea if I'm not mistaken). Be sure to have a centralWidget. Widgets can be placed as separate windows, or in tab style, like QTabWidget . Drag and collapse if necessary.
There are some problems in fine tuning the styles (stylesheet qss). For example, margin and border do not work. You can create a header and load it in QDockWidget.
|
Perhaps you should use MDI (multi-windowed area), or DockWidget (which can be made relocatable).
|
