It doesn't work that way either
class MyStyle : public ProxyStyle
{
public:
int pixelMetric
(PixelMetric metric,
const QStyleOption* option
= 0,
public slots:
QIcon standardIconImplementation
(StandardPixmap standardIcon,
const QStyleOption* option
= 0,
};
class MyStyle : public ProxyStyle
{
public:
MyStyle(const QString &baseStyle);
int pixelMetric(PixelMetric metric, const QStyleOption* option = 0,
const QWidget* widget = 0) const;
public slots:
QIcon standardIconImplementation(StandardPixmap standardIcon, const QStyleOption* option = 0,
const QWidget* widget = 0) const;
};
To copy to clipboard, switch view to plain text mode
int MyStyle
::pixelMetric(PixelMetric metric,
const QStyleOption* option,
{
if (metric == PM_DockWidgetHandleExtent || metric == PM_DockWidgetSeparatorExtent)
{
qDebug()<<"PM_DockWidgetHandleExtent";
return 110;
}
else
return ProxyStyle::pixelMetric(metric, option, widget);
}
QIcon MyStyle
::standardIconImplementation(StandardPixmap standardIcon,
const QStyleOption* option,
{
if(standardIcon == SP_TitleBarNormalButton)
else
return ProxyStyle::standardIcon(standardIcon, option, widget);
}
int MyStyle::pixelMetric(PixelMetric metric, const QStyleOption* option,
const QWidget* widget) const
{
if (metric == PM_DockWidgetHandleExtent || metric == PM_DockWidgetSeparatorExtent)
{
qDebug()<<"PM_DockWidgetHandleExtent";
return 110;
}
else
return ProxyStyle::pixelMetric(metric, option, widget);
}
QIcon MyStyle::standardIconImplementation(StandardPixmap standardIcon, const QStyleOption* option,
const QWidget* widget) const
{
if(standardIcon == SP_TitleBarNormalButton)
return QIcon(QPixmap(":/resources/backfordropdown.jpg"));
else
return ProxyStyle::standardIcon(standardIcon, option, widget);
}
To copy to clipboard, switch view to plain text mode
pixelMetric also doesn't work
Bookmarks