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

Qt causes Python's Py_Main to no-op on Windows

    XMLWordPrintable

Details

    • Bug
    • Resolution: Incomplete
    • Not Evaluated
    • None
    • 5.15.2, 6.3.0
    • Other
    • None
    • Windows

    Description

      There is a a very weird bug with Python 3.10.4 and Qt such that if you reference any non-trivial Qt classes or methods (such as qIsFinite, QString, or QVector) on Windows, trying to call Py_Main (or Py_BytesMain), which runs the standard Python interpreter's main function, will result in a no-op (the program will immediately exit 0 and not show the Python interactive shell). Furthermore, the bug is absent on MacOS, and the bug occurs with both MSVC and MinGW builds of Qt. I have linked a minimal example of the bug at https://github.com/Landmaster/python-embed-qt-bug The corresponding bug report on the Python side is at https://github.com/python/cpython/issues/93013

      Attachments

        Issue Links

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

          Activity

            People

              kleint Friedemann Kleint
              landmaster Thanh-Phuong Tran
              Votes:
              0 Vote for this issue
              Watchers:
              4 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved:

                Gerrit Reviews

                  There are no open Gerrit changes