Important: Please read the Qt Code of Conduct -

"Icon theme * not found." message when the icon theme is found

  • I'm setting up an application, I'm adding custom search paths for the icon theme, and setting the icon theme.
    Icons are loaded just fine but I get the message about the theme in stderr

    This is the code in my main:

    int main(int argc, char *argv[])
        QApplication app(argc, argv);
        AppInfo& info = AppInfo::instance();
        QStringList search_paths = info.data_paths("icons");
        search_paths += QIcon::themeSearchPaths();
        QPalette palette = QGuiApplication::palette();
        if ( palette.color(QPalette::Button).value() < 100 )
        GlaxnimateWindow window;;
        return app.exec();

    The message in stderr:

    Icon theme "icons" not found.

    It seems to be output by app.exec();.
    I'm able to use QIcon::fromTheme and get a pixmap from that icon in main before exec() and that doesn't cause the message, so I assume it isn't caused by QIcon.
    The message doesn't appear if I use one of the system icon themes in setThemeName (I'm on Kubuntu - KDE).

    Having spurious messages in stderr bothers me so I was trying to find what's causing it. If anyone has ideas it would be great.