PDA

View Full Version : Can I change titlebar height and frame width using stylesheet?



melody:p
7th August 2012, 03:42
I can change titlebar hegiht and frame width using qstyle like this :



int MyStyle::pixelMetric(PixelMetric which, const QStyleOption *option, const QWidget *widget) const
{
switch (which)
{
case PM_DefaultFrameWidth:
return 5;
case PM_TitleBarHeight:
return 50;
default:
return QWindowsStyle::pixelMetric(which, option, widget);
}
}


but I want to change them using style sheet.

Is it possible?
I search method to change them using style sheet some hours, but I can't find.

Can I change titlebar height and frame width only using qstyle??

high_flyer
7th August 2012, 09:16
AFAIK you can't style top level window title bars with style sheets.