Details
Description
Using a hello world example (together with Python 3.9 or 3.12) like below
main.py:
import sys from PySide6.QtGui import QGuiApplication from PySide6.QtQml import QQmlApplicationEngine app = QGuiApplication(sys.argv) engine = QQmlApplicationEngine() engine.quit.connect(app.quit) engine.load('main.qml') sys.exit(app.exec())
main.qml:
import QtQuick 2.15 import QtQuick.Controls 2.15 ApplicationWindow { visible: true width: 600 height: 500 title: "HelloApp" Text { anchors.centerIn: parent text: "Hello World" font.pixelSize: 24 } }
Steps:
- pip install Pyside6==6.6.3
- python main.py
Result:
> python main.py
QQmlApplicationEngine failed to load component
file:///C:/Users/User/hello/main.qml:2:1: module "QtQuick.Controls" version 6.6 cannot be imported because:
module "QtQuick.Controls.Windows" version 6.6 cannot be imported because:
Cannot load library C:\Users\User\hello\hello\lib\site-packages\PySide6\qml\QtQuick\Controls\Basic\qtquickcontrols2basicstyleplugin.dll: The specified module could not be found.
Debugging with loader snaps reveals that it cannot load that dll because it cannot find Qt6QuickControls2Basic.dll. Searching through the PySide6 folder in site-packages seems to confirm that this dll is in fact not there.
Attachments
Issue Links
- is duplicated by
-
PYSIDE-2657 Basic QML QtQuick Controls broken since 6.6.3 release on PyPi
- Closed
-
PYSIDE-2661 [Reg 6.6.2 -> 6.6.3] Qt Quick Controls DLLs are missing from pip packages
- Closed
- relates to
-
QTBUG-121643 qt6-declarative: possible build-time race condition around qmlcachegen
- Closed