Details
-
Bug
-
Resolution: Done
-
P2: Important
-
5.12.0
-
None
-
-
add92a551cf601b5c9e074046326f95ccc38062e (qt/qtbase/dev) 47fed5b00732902d57063902c98d0a601d9ff239 (qt/qtbase/5.12) 843a3b4bf1fd62a72646afaf0efb348b1f444b78 (qt/qtbase/5.15)
Description
on Linux, for most styles (for instance Material is affected) the following code, doesn't show an icon anymore (worked fine in Qt 5.10 and 5.11):
Button
{ icon.name: "go-up" }
looking into QQuickIconImage::setName(), it loads the icon with
d->icon = QIconLoader::instance()->loadIcon(name);
if i do:
qDebug()<<QIconLoader::instance()->themeName(); i can see it has an empty theme name, instead of the system one.
If i add before loadIcon() the code:
QIconLoader::instance()->updateSystemTheme();
it sets the correct theme and the icon is loaded correctly.
updateSystemTheme doesn't seem to be called anywhere in either qtbase or qtquickcontrols2 repositories, where should this be done?
Attachments
Issue Links
- relates to
-
QTBUG-48121 Custom icon theme is used correctly by QIcon only if the QApplication has not been constructed
- Closed
- links to