Uploaded image for project: 'Qt Creator'
  1. Qt Creator
  2. QTCREATORBUG-32292

Python projects fail in Qt Creator when Qt Quick designer components are used (missing pyside6-ds wheel)

    XMLWordPrintable

Details

    • Suggestion
    • Resolution: Unresolved
    • P4: Low
    • None
    • Qt Creator 15.0.0
    • Python Support
    • None
    • Qt Design Studio 4.6
      Qt Creator 15

    • Windows

    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

      Attachments

        No reviews matched the request. Check your Options in the drop-down menu of this sections header.

        Activity

          People

            davschul David Schulz
            indi Indivara Weerasuriya
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

            Dates

              Created:
              Updated:

              Gerrit Reviews

                There are no open Gerrit changes