-
Bug
-
Resolution: Fixed
-
P1: Critical
-
6.8.3, 6.9.0
-
260b0a34c (dev), 5088d0db5 (6.9), eeaba8722 (tqtc/lts-6.8)
When adding multiple svg images to a QIcon, if the first image is added with a mode and state value different from the default values (QIcon::Normal and QIcon::Off), the specified values are ignored, i.e. the image is added with Normal state and Off mode.
QIcon icon1;
icon1.addFile(":images/green.svg", QSize(), QIcon::Normal, QIcon::Off);
// Image is added with specified mode and state
icon1.addFile(":images/red.svg", QSize(), QIcon::Normal, QIcon::On);
QIcon icon2;
// Image is added with Normal mode and Off State; specified state ignored
icon2.addFile(":images/red.svg", QSize(), QIcon::Normal, QIcon::On);
icon2.addFile(":images/green.svg", QSize(), QIcon::Normal, QIcon::Off);
To reproduce, run the attached example project.
- is duplicated by
-
QTBUG-137260 QIcon:addFile with a SVG file hardcodes QIcon::Normal / QIcon::Off
-
- Closed
-
- resulted from
-
QTBUG-8151 Performance optimization when using SVG graphics with QIcon (QSvgIconEngine)
-
- Closed
-