Details
-
Suggestion
-
Resolution: Unresolved
-
P4: Low
-
None
-
Qt Creator 15.0.0
-
None
-
Qt Design Studio 4.6
Qt Creator 15
Description
When Python projects that use designer components (like QtQuick.Studio.Application) are exported from QDS and run in Creator, execution fails without giving details of the error.
Steps to reproduce
- Create a project in QDS 4.6
- Export Project > Enable Python Generator
- Create a Python project in Qt Creator
- Add the generated code above, open main.py and install PySide6 using the install button in the IDE
- Run the project
Result:
Compiler output (no error)
15:59:04: Running steps for project Project... 15:59:04: Starting: "C:\...\Project\.qtcreator\Python_3_11_64_bit_venv\Scripts\pyside6-project.exe" build 15:59:06: The process "C:\...\Project\.qtcreator\Python_3_11_64_bit_venv\Scripts\pyside6-project.exe" exited normally. 15:59:06: Elapsed time: 00:01.
Application output (fails but no details)
15:59:06: Starting C:\...\Project\.qtcreator\Python_3_11_64_bit_venv\Scripts\python.exe -u main.py... 15:59:06: C:\...\Project\.qtcreator\Python_3_11_64_bit_venv\Scripts\python.exe exited with code -1
When the program is run manually from a command prompt, error details are shown as follows
QQmlApplicationEngine failed to load component file:///C:/.../Project/ProjectContent/App.qml:14:5: Type Screen01 unavailable file:///C:/.../Project/ProjectContent/Screen01.ui.qml: Type Constants unavailable file:///C:/.../Project/Project/Constants.qml:3:1: module "QtQuick.Studio.Application" is not installed
To fix this, pyside6_ds must be installed manually in Qt Creator's virtual environment. The project then works in Creator as well.
pip install pyside6_ds
Expected behavior
- Install pyside6_ds automatically when required by the project
- Show error details when packages are missing