Details
-
Bug
-
Resolution: Done
-
P2: Important
-
None
-
6.8.1
Description
Strangely if .png is added first and then .svg in QIcon, it works availableSizes() returns both.
But if .svg is added first and then .png then availableSizes() returns nothing. Though icons are displayed.
Document does says the type of icon engine is determined by the first file to a QIcon object. Additional files will then be handled by the same engine, so here Icon engine provided by QtSvg module should add it.
But when querying availableSizes() QPixmapIconEngine::availableSizes() does returns the data, but following function which is called in case of svg has no implementation.
QList<QSize> QIconEngine::availableSizes(QIcon::Mode /*mode*/, QIcon::State /*state*/) { return {}; }
Attached tiny example can be used to see this.