Ever since the Neon updated to Plasma 6.0 I have a problem with Kirigami apps not loading dark theme correctly. Here’s a Quick Settings KCM displaying light background with light font color when set to dark mode:
When starting, systemsettings complain about about a missing theme “Fusion”:
kf.kirigami.platform: Failed to find a Kirigami platform plugin for style "Fusion"
I’ve created a new account but the problem persists, could there be a problem with the installation itself or some old /etc config files? I’ve also tried to compare the installed breeze packages to a live CD Neon, but there are no obvious differences. I’ve seen some similar reports, but without a solution.
There’s a workaround to start these apps with QT_QUICK_CONTROLS_STYLE=org.kde.desktop systemsettings, the theme then loads properly.
Running into the same problem some time ago. Not certain if related but it seems like all of this started happening for me since qt6. Dolphin file manager also is struggling with some icons being black and others white. Opening Kdenlive from a .kdenlive fine will also have white backgrounds and white texts and some parts will be dark theme.
So far I found nothing to actually fix this and looking up what message I got took me here.
Is installed. Any other ideas? Been trying to fix this for the past 2 days, cleared cache without any result as well. Switching QT_QPA_PLATFORMTHEME between qt5ct and qt6ct also has no results.
It was indeed an ancient version of plasma-integration for me, apparently apt didn’t upgrade it to 6.0.2. It also fixed mixed icon colors in Dolphin and Kontact. Thanks!
If you are running KDE Plasma then you should not have qt5ct or qt6ct installed; these packages conflict with plasma-integration. If you are not running KDE Plasma then unfortunately I do not know how to help.
This please make sure you’re not overriding the platformtheme in any way or the QT_QUICK_CONTROLS_STYLE. On KDE Plasma, plasma-integration is supposed to be handling all of that
I had the same issue after the Plasma 6 update (KDEneon user edition).
It was also caused by the plasma-integration package being stuck on version 5.19.5-0xneon+20.04+focal+build11.
But neither doing a pkcon update nor apt update && apt full-upgrade found any available updates.
The cause for this were apt preferences defined under /etc/apt/preferences.d, specifically 99-plasma-integration which pinned the package to version 5.1*. This seems to be a remnant of an old version of neon, as I am using neon on this device since 2018 and have been upgrading neon from then without doing a fresh reinstallation.
So if anyone has the same issue as I had, check your /etc/apt/preferences.d directory for remnants.
For reference, a fresh, up-to-date neon install currently only contains the following files: 50-neon-ubuntu-release-upgrader 99-jammy-overrides 99-neon-base-files org-kde-neon-net-launchpad-ppa-mozillateam-pin.
Meanwhile, my current installation additionally contained: 99-neon-software-properties 99-plasma-integration 99-pulseaudio-qt.
# Construct the path to the PyQt6 plugins directory
# pyqt6_plugins_path = '/opt/python-venv/venv-3.11/lib/python3.11/site-packages/PyQt6/Qt6/plugins'
pyqt6_plugins_path = os.path.join(sys.prefix, 'lib', f'python{sys.version_info.major}.{sys.version_info.minor}', 'site-packages', 'PyQt6', 'Qt6', 'plugins')
# Set QT_PLUGIN_PATH to include both the PyQt6 plugins and the system Qt plugins
os.environ['QT_PLUGIN_PATH'] = f'{pyqt6_plugins_path}:/usr/lib/qt6/plugins'
# Set the Qt Quick Controls style for Kirigami to prevent the "Fusion" warning
os.environ["QT_QUICK_CONTROLS_STYLE"] = "org.kde.desktop"
app = QGuiApplication(sys.argv)
engine = QQmlApplicationEngine()
# Add the system QML import path
engine.addImportPath("/usr/lib/qt6/qml")
module "org.kde.kirigami" is not installed
module "org.kde.desktop" is not installed
kf.kirigami.platform: Failed to find a Kirigami platform plugin for style "Fusion"
mean that the Qt Quick QML engine can’t find some required QML modules and style plugins.
The first two errors indicate that the Kirigami (org.kde.kirigami) and KDE desktop style (org.kde.desktop) QML modules are missing from the engine’s import paths.
The third error occurs because Kirigami is trying to use the Fusion style, but the corresponding Kirigami platform plugin for that style is not found. This usually happens when the style is not explicitly set to org.kde.desktop and the fallback style (Fusion) is used instead.
When using PyQt6 inside a virtual environment, Qt sometimes won’t automatically find the system QML and plugin directories, so you need to manually configure them before loading your QML files.
Below is a working example for PyQt6. If you’re using PySide6, the logic is the same, but class/module names will change slightly.
import os
import sys
from PyQt6.QtCore import QUrl
from PyQt6.QtGui import QGuiApplication
from PyQt6.QtQml import QQmlApplicationEngine
# 1. Construct the path to the PyQt6 plugins directory inside your virtual environment
pyqt6_plugins_path = os.path.join(
sys.prefix, # Path to your virtual environment root
'lib',
f'python{sys.version_info.major}.{sys.version_info.minor}',
'site-packages', 'PyQt6', 'Qt6', 'plugins'
)
# 2. Tell Qt where to find its plugins
# We combine the PyQt6 plugin path with the system-wide Qt plugin path.
os.environ['QT_PLUGIN_PATH'] = f'{pyqt6_plugins_path}:/usr/lib/qt6/plugins'
# 3. Set the style for Qt Quick Controls to "org.kde.desktop"
# This avoids the fallback to "Fusion" and ensures the Kirigami platform plugin can be found.
os.environ["QT_QUICK_CONTROLS_STYLE"] = "org.kde.desktop"
# 4. Create the Qt application and QML engine
app = QGuiApplication(sys.argv)
engine = QQmlApplicationEngine()
# 5. Add the system QML import path so Kirigami and KDE styles can be found
# This is where your OS stores the QML modules like org.kde.kirigami.
engine.addImportPath("/usr/lib/qt6/qml")
# 6. Now load your main QML file
engine.load(QUrl.fromLocalFile("main.qml"))
if not engine.rootObjects():
sys.exit(-1)
sys.exit(app.exec())
Why this works
engine.addImportPath("/usr/lib/qt6/qml"): Makes the QML engine look in the system directory where org.kde.kirigami and org.kde.desktop are installed. Without this, it will only search in your virtual environment’s limited QML path.
QT_PLUGIN_PATH: Ensures that Qt can find the platform and style plugins it needs for rendering Kirigami components.
QT_QUICK_CONTROLS_STYLE: Forces Kirigami to use the KDE desktop style instead of falling back to the “Fusion” style. This prevents the Failed to find a Kirigami platform plugin for style "Fusion" warning and ensures the application uses the correct native look.
If you’re on another platform (e.g., Windows or macOS), you’ll need to adjust the paths accordingly.