diff --git a/widgets/icon.cpp b/widgets/icon.cpp index da1fce5b4..0794fd542 100644 --- a/widgets/icon.cpp +++ b/widgets/icon.cpp @@ -978,7 +978,8 @@ void Icon::setText(const QString& text) d->currentSize = QSizeF(-1, -1); //try to relayout, needed if an icon was never shown before if (!isVisible()) { - layoutIcons(new QStyleOptionGraphicsItem); + QStyleOptionGraphicsItem styleoption; + layoutIcons(&styleoption); } resize(sizeFromIconSize(d->iconSize.width())); }