qt.dbus.integration: Could not connect "org.freedesktop.IBus" to globalEngineChanged(QString)
QQmlApplicationEngine failed to load component
file:///home/rokejulianlockhart/RTBJK9/code/manage_monitors/code/attempts/1 (QML)/manage_monitors-0/ui/main.qml:10:1: module "org.kde.kirigami" is not installed
@ngraham, any idea of what the package name might be? Or better yet, which exact filenames I can query my distribution’s repositories for, like a .so?
Without knowing which distro you’re using, not really. And even then, I’m no tfamiliar with the packaging details of every distro. You can try searching for “kirigami” using your package manager.
Do you know whether there’s at least a specific binary I can search for with cnf that would identify Kirigami and/or its development counterpart? If not, do you know of any distributions that definitely do package Kirigami?
I have a feeling that it’s a dependency that’s erroneously not packaged by OpenSUSE factory, since MyGNUHealth reports it as unavailable, too:
Next time, mention you’re working with PySide (2 or 6) and the distro you’re using in the first message, otherwise commenters won’t be able to help you. There is clearly an XY problem here too.
If you’re creating your own application with PySide2 and you want to package it, you’ll need to install python3-pyside2-devel and kirigami2-devel on openSUSE, as pip won’t work for this.
If you’re creating your app with PySide6, I believe it’s expected that you won’t find Kirigami, because your app will search for Kirigami built with Qt6. You’d need to manually point to self-built Kirigami (with the generated prefix.sh). I have a blog post about this that is mostly ready, but I’m currently busy with something else.
Nope. I think that package is just there for compatibility purposes.
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.