Unsolved Missing .dll Error Running QML/PySide/QtQuick stock application.
-
I Get the following error when trying to run the stock generated Qt Quick - Python project in QtCreator:
file:///C:/GIT/mwp021-2/main.qml:1:1: plugin cannot be loaded for module "QtQuick": Cannot load library C:\Users\xxxxxx\AppData\Local\Packages\PythonSoftwareFoundation.Python.3.9_qbz5n2kfra8p0\LocalCache\local-packages\Python39\site-packages\PySide2\qml\QtQuick.2\qtquick2plugin.dll: The specified module could not be found.
I checked my filesystem and this file is there.
import QtQuick 2.15 import QtQuick.Window 2.15 Window { width: 640 height: 480 visible: true title: qsTr("Hello World") }
# This Python file uses the following encoding: utf-8 import sys import os from PySide2.QtGui import QGuiApplication from PySide2.QtQml import QQmlApplicationEngine if __name__ == "__main__": app = QGuiApplication(sys.argv) engine = QQmlApplicationEngine() engine.load(os.path.join(os.path.dirname(__file__), "main.qml")) if not engine.rootObjects(): sys.exit(-1) sys.exit(app.exec_())
# This Python file uses the following encoding: utf-8 import sys import os from PySide2.QtGui import QGuiApplication from PySide2.QtQml import QQmlApplicationEngine if __name__ == "__main__": app = QGuiApplication(sys.argv) engine = QQmlApplicationEngine() engine.load(os.path.join(os.path.dirname(__file__), "main.qml")) if not engine.rootObjects(): sys.exit(-1) sys.exit(app.exec_())