diff --git a/src/gui/image/qiconloader.cpp b/src/gui/image/qiconloader.cpp index 5f6ce0bbc7d..d8a0878cc3d 100644 --- a/src/gui/image/qiconloader.cpp +++ b/src/gui/image/qiconloader.cpp @@ -135,8 +135,9 @@ void QIconLoader::invalidateKey() { // Invalidating the key here will result in QThemeIconEngine // recreating the actual engine the next time the icon is used. - // We don't need to clear the QIcon cache itself. m_themeKey++; + // Since the key has changed, we need to clear the cache as well. + QIconPrivate::clearIconCache(); } QString QIconLoader::themeName() const