Uploaded image for project: 'Qt for Python'
  1. Qt for Python
  2. PYSIDE-2471

pyside6-project does not handle .pyw files causing QT Creator to not launch the main.pyw

    XMLWordPrintable

Details

    • Bug
    • Resolution: Fixed
    • P4: Low
    • 6.6.0
    • 6.5.2
    • PySide
    • None
    • Qt Creator 11.0.2
      Based on Qt 6.5.1 (GCC 13.2.1 20230801, x86_64)
      Copyright 2008-2023 The Qt Company Ltd. All rights reserved.
    • Linux/X11
    • d5ec09b3c (dev), 50d971046 (6.6), f13af24b1 (6.5)

    Description

      around line 40:-
      in venv/lib/python3.11/site-packages/PySide6/scripts/project/project_data.py:-

                          if file.suffix == ".qml":
                              self._qml_files.append(file)
                          elif file.suffix == ".py":
                              if file.name == "main.py":
                                  self.main_file = file
                              self._python_files.append(file)
      

      This prevents QT Creator from setting main.pyw as the main project file to execute at the build stage. Qt Creator, under some circumstances (disable the pyside6 project tool, have a main.py file entry in the .pyproject file), successfully launch the desired main.pyw file. If there is no main.py entry in the .pyproject file - The build task will fail, and nothing will launch.

      The QT Creator Is built from source with a fix suggested by QT to permit the execution of a main.pyw:-

      [It looks like we have overseen the text/x-python-gui mime type when looking for executable python scripts in a project: fix is up at https://codereview.qt-project.org/c/qt-creator/qt-creator/+/504708]

      I strongly suspect that a version of QT Creator with this fix has NOT been released.

      Attachments

        For Gerrit Dashboard: PYSIDE-2471
        # Subject Branch Project Status CR V

        Activity

          People

            kleint Friedemann Kleint
            oldguy Peter Greenwood
            Votes:
            0 Vote for this issue
            Watchers:
            3 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved:

              Gerrit Reviews

                There are no open Gerrit changes