diff --git a/widgets/toolbutton.cpp b/widgets/toolbutton.cpp index b522eb937..e72884542 100644 --- a/widgets/toolbutton.cpp +++ b/widgets/toolbutton.cpp @@ -436,17 +436,6 @@ QSizeF ToolButton::sizeHint(Qt::SizeHint which, const QSizeF & constraint) const { QSizeF hint = QGraphicsProxyWidget::sizeHint(which, constraint); - if (hint.isEmpty()) { - return hint; - } - - //replace the native margin with the Svg one - QStyleOption option; - option.initFrom(nativeWidget()); - int nativeMargin = nativeWidget()->style()->pixelMetric(QStyle::PM_ButtonMargin, &option, nativeWidget()); - qreal left, top, right, bottom; - d->background->getMargins(left, top, right, bottom); - hint = hint - QSize(nativeMargin, nativeMargin) + QSize(left+right, top+bottom); return hint; }