# 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")