PDA

View Full Version : QStyle's question



aoo7wangyan
15th July 2009, 01:23
i want to change menu item's height,but the code didnot work.i don't know how to use PixelMetric.


int Mstyle::pixelMetric(PixelMetric which, const QStyleOption* option, const QWidget * widget) const
{
switch(which)
{
case PM_MenuHMargin:
return 40;
case PM_MenuVMargin:
return 40;
default:
return QWindowsStyle::pixelMetric(which,option,widget);
}
}

wysota
15th July 2009, 09:42
Please provide a minimal compilable example reproducing the problem.