I'm a junior software engineer and i have a idea, but i don't know how to realize them. I want to override a QMdiArea's SubWindowView. Actually i want to mix SubWindowView and TabbedView. I want to give to SubWindowView some features from TabbedView for example. Tabs panel with names of windows and when you click on some tab window with it's name displayed above other windows.
Asked
Active
Viewed 251 times
1 Answers
1
It's possible. You need to add a QTabBar
on top of QMdiArea
and implement its behavior manually (e.g. add new tabs when new windows are created and close a window when tab close is requested).

Pavel Strakhov
- 39,123
- 5
- 88
- 127
-
It is a good idea, but my application already has button which changes QMdiArea's view mode dynamically and what does i should to do with this QTabBar when the windows are displayed as tabs? Is there a better solution?(thanks for your advice:) ) – zuzman322 Dec 20 '13 at 03:53
-
but maybe should i to create QTab bar every time when i change a view mode on SudWindowView and destroy it when i change a view mode on Tabbed view? just one qustion : will QMdiArea change her size when i do that? (QMdiArea contains in QVBoxLayout) – zuzman322 Dec 20 '13 at 04:26
-
You can destroy or just hide QTabBar when it's not needed. If you use layouts properly, QMdiArea should fill all available space. – Pavel Strakhov Dec 20 '13 at 11:21
-
I did that, but then add QTabBar on Layout second it changes her position(( any idea how to fix that?) – zuzman322 Dec 20 '13 at 15:11