Quantcast
Channel: Active questions tagged qtquick2 - Stack Overflow
Viewing all articles
Browse latest Browse all 137

PySide6 and QML error: qtquick2plugin.dll: The specified module could not be found

$
0
0

I use python version 3.11.1 in a virtual env and used pip install pyside6 to install pyside6

The full error I get is:

QQmlApplicationEngine failed to load componentfile:///E:/project_path/gui_pyside6/first_gui/virenv/src/main.qml:1:1: Cannot load library E:\project_path\gui_pyside6\first_gui\virenv\Lib\site-packages\PySide6\qml\QtQuick\qtquick2plugin.dll: The specified module could not be found.

I have checked and qtquick2plugin.dll is in that folder. I even added the path to my environment paths, but nothing seems to solve it. How can I solve this?

This is my main.py

import sysfrom PySide6.QtGui import QGuiApplicationfrom PySide6.QtQml import QQmlApplicationEngineapp = QGuiApplication(sys.argv)engine = QQmlApplicationEngine()engine.quit.connect(app.quit)engine.load('main.qml')sys.exit(app.exec())

This is my main.qml

import QtQuick 2.15import QtQuick.Controls 2.15ApplicationWindow {    visible: true    width: 600    height: 500    title: "HelloApp"    Text {        anchors.centerIn: parent        text: "Hello World"        font.pixelSize: 24    }}

Platform: Windows 10


Viewing all articles
Browse latest Browse all 137

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>