Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • Users
  • Groups
  • Search
  • Get Qt Extensions
  • Unsolved
Collapse
Brand Logo
  1. Home
  2. Qt Development
  3. General and Desktop
  4. "Icon theme * not found." message when the icon theme is found
Forum Updated to NodeBB v4.3 + New Features

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

Scheduled Pinned Locked Moved Unsolved General and Desktop
qiconiconicon in ubuntutheme
1 Posts 1 Posters 730 Views
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • G Offline
    G Offline
    Glax
    wrote on last edited by
    #1

    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();
        app.setApplicationName(info.slug());
        app.setApplicationDisplayName(info.name());
        app.setApplicationVersion(info.version());
        app.setOrganizationName(info.organization());
        app.setWindowIcon(QIcon(info.data_file("icon.svg")));
    
        QStringList search_paths = info.data_paths("icons");
        search_paths += QIcon::themeSearchPaths();
        QIcon::setThemeSearchPaths(search_paths);
    
        QPalette palette = QGuiApplication::palette();
        if ( palette.color(QPalette::Button).value() < 100 )
            QIcon::setThemeName("icons-dark");
        else
            QIcon::setThemeName("icons");
    
        GlaxnimateWindow window;
        window.show();
        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.

    1 Reply Last reply
    0

    • Login

    • Login or register to search.
    • First post
      Last post
    0
    • Categories
    • Recent
    • Tags
    • Popular
    • Users
    • Groups
    • Search
    • Get Qt Extensions
    • Unsolved