diff --git a/src/libkirigami/platformtheme.cpp b/src/libkirigami/platformtheme.cpp --- a/src/libkirigami/platformtheme.cpp +++ b/src/libkirigami/platformtheme.cpp @@ -898,6 +898,16 @@ return PlatformThemePrivate::s_pluginFactory->createPlatformTheme(object); } else if (!s_factoryChecked) { s_factoryChecked = true; + + // static plugins take preference + for (QObject* staticPlugin : QPluginLoader::staticInstances()) { + KirigamiPluginFactory *factory = qobject_cast(staticPlugin); + if (factory) { + PlatformThemePrivate::s_pluginFactory = factory; + return factory->createPlatformTheme(object); + } + } + #if QT_CONFIG(library) const auto libraryPaths = QCoreApplication::libraryPaths(); for (const QString &path : libraryPaths) {