Questions about QMdiSubWindow title bar
General and Desktop
6
Posts
3
Posters
6.1k
Views
1
Watching
-
wrote on 27 Mar 2011, 09:17 last edited by
I have the following questions about QMdiSubWindow:
- How do I add more buttons apart from maximize, minimize and close to a QMdiSubWindow?
- Is there a way to change the icons for QMdiSubWindow?
- Is there a way to automatically hide the title bar and border of QMdiSubWindow?
- Is there a way to theme the border and title bar for QMdiSubWindow?
-
wrote on 27 Mar 2011, 09:27 last edited by
- Draw your own title bar
- Yes
- I don't understand the question. Hide based on what?
- Yes, see first point.
-
wrote on 27 Mar 2011, 09:39 last edited by
Thanks Andre. How do I draw my own title bar? Just add a widget and add buttons to it?
-
wrote on 27 Mar 2011, 09:41 last edited by
For instance, yes. And make sure you make sure that your title bar reimplements all the functionality that a normal title bar has.
-
wrote on 27 Mar 2011, 09:49 last edited by
Hi itzram,
you can create your own style (QStyle or dervived subclass) where you draw that stuff. the MDI sub windows draw completly via QStyle painting.
To change layout of the border the border etc, use the parameters of QMdiArea::addSubWindow.
-
wrote on 31 Mar 2011, 16:43 last edited by
Thanks Gerolf.
2/6