[SOLVED]Custome QDockWidget Title Bar
-
Hi Guys,
Is it possible to customize or modify the color or the font-size of a QDockWidget Title Bar? If yes, how please?
Cheers.
-
Yes, for example via stylesheet:
@
QDockWidget {
color: #369;
font-size: 20px;
}
@ -
Yes it's possible The ::title subcontrol can be used to customize the title bar.
Like this :-
@QDockWidget::title
{
font-family: "Roboto Lt";
font-size: 18pt;
background: lightgray;
padding-left: 10px;
padding-top: 4px;
}@ -
@Eslam mahgoub
While ::title sub-control works for borders, background-color and other box properties the text itself is styled with QDockWidget{}, without the ::title. -
Hi Guys,
@Eslam, Chris is right: I tried both.For the font and the color of the title only Chris code works.
Thanks a lot to both anyways.