diff --git a/widgets/icon.cpp b/widgets/icon.cpp index dd480fd3a..5b8fe246a 100644 --- a/widgets/icon.cpp +++ b/widgets/icon.cpp @@ -602,7 +602,9 @@ QPixmap Icon::Private::decoration(const QStyleOptionGraphicsItem *option, bool u if (iconSvgPixmap.size() != iconSize.toSize()) { QImage img(iconSize.toSize(), QImage::Format_ARGB32_Premultiplied); { + img.fill(0); QPainter p(&img); + iconSvg->resize(iconSize); iconSvg->paint(&p, img.rect(), iconSvgElement); } iconSvgPixmap = QPixmap::fromImage(img);