Details
-
Bug
-
Resolution: Invalid
-
P1: Critical
-
None
-
6.2.3, 6.4
-
None
Description
At least when creating a UI file in Designer, specifying the theme name no longer works like it did in Qt 5. See screenshots.
In qtbase/examples/widgets/richtext/textedit and qtbase/examples/widgets/mainwindows/application (and others), QIcon::fromTheme() is in use. It seems that in both Qt 5 and Qt 6, I get fallback icons rather than theme icons, on my plain X11 desktop. And qtbase/examples/widgets/mainwindows/application has a couple of actions without fallback icons:
const QIcon saveAsIcon = QIcon::fromTheme("document-save-as"); const QIcon exitIcon = QIcon::fromTheme("application-exit");
Those do not have icons on the menu, neither in Qt 5 nor in Qt 6. It seems to me that it should choose one, even if I'm not running on KDE or Gnome (fall back to a default theme). Not sure if this issue is related. FWIW /usr/share/icons/hicolor and /usr/share/icons/default do not contain an icon for document-save-as; but other themes do have it. QIcon::themeName() and QIcon::fallbackThemeName() are both "hicolor" (checked by adding a qDebug to tst_QIcon::fromTheme).
Setting QT_QPA_SYSTEM_ICON_THEME=oxygen is a workaround. But maybe there's a more standard env var to set. I already had GTK_THEME=Vertex:dark.
Attachments
Issue Links
- relates to
-
QTBUG-102346 QIcon theme revamp
- In Progress