Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • Users
  • Groups
  • Search
  • Get Qt Extensions
  • Unsolved
Collapse
Brand Logo
  1. Home
  2. Qt Development
  3. Qt for Python
  4. pyside6 with Addons > 6.5.3 hags on windows 10
QtWS25 Last Chance

pyside6 with Addons > 6.5.3 hags on windows 10

Scheduled Pinned Locked Moved Unsolved Qt for Python
pythonpyside
5 Posts 2 Posters 486 Views
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • P Offline
    P Offline
    pawel.olas
    wrote on 25 Oct 2024, 01:58 last edited by
    #1

    we are having a problem with pySide6 hanging when QUiLoader is created after QApplication in any pip installed versions newer than 6.5.3.

    we use the official python for windows (3.10, 3.11, we tested a few) for instance this one:
    https://www.python.org/ftp/python/3.11.6/python-3.11.6-amd64.exe
    when PySide6 is pip installed:
    python -m "pip" install PySide6 --prefix=%INSTALL_PATH%

    then it hangs on QLoader:

    import PySide6
    from PySide6.QtUiTools import QUiLoader
    from PySide6.QtWidgets import QApplication
    app = QApplication()
    loader = QUiLoader()
    

    this never completes and hangs the interpreter. After a fair bit of experimentation we discovered that Pyside6-Addons is what is causing the issue and when we install only the essentials the problem goes away:

    python -m "pip" install "PySide6-Essentials" --prefix=%INSTALL_PATH%

    We tested many versions and the last one that works without special treatment is 6.5.3. everything newer has to be installed without the Addons.

    widows 10 1909

    at this stage we do not know what could be causing this. There are posts online where people complain about the same issue so this is not isolated case. We tested in very clean environments with only PySide6 pip installed to the clean python so this is not a conflict with another package.

    1 Reply Last reply
    1
    • F Offline
      F Offline
      friedemannkleint
      wrote on 25 Oct 2024, 06:11 last edited by
      #2

      Most likely it is an old bug in the QWebEngineView Designer plugin that causes a QUiLoader to hang on loading. Please consider updating to 6.8 or use uic ( see https://doc.qt.io/qtforpython-6/tutorials/basictutorial/uifiles.html#tutorial-uifiles ).

      1 Reply Last reply
      0
      • P Offline
        P Offline
        pawel.olas
        wrote on 25 Oct 2024, 06:54 last edited by
        #3

        This is PySide 6.8.0.1 so the problem is still there. The page you linked describes the same process we use (option B).
        We actually use Qt.py, which handles loading UIs through QtCompat.loadUi, which uses the QUiLoader under the hood.

        1 Reply Last reply
        0
        • F Offline
          F Offline
          friedemannkleint
          wrote on 25 Oct 2024, 09:21 last edited by
          #4

          Please consider migrating to Option A) (uic) , which reduces the overhead of loading and avoids these problems altogether.

          If it hangs, it means some manifestation of QTBUG-118317 reappeared. You can try to verify by removing the plugin and then comment on the report.

          1 Reply Last reply
          1
          • P Offline
            P Offline
            pawel.olas
            wrote on 28 Oct 2024, 05:59 last edited by
            #5

            It looks exactly like the bug reported there and it says it was fixed.
            I think we are ok to use Pyside6 without the addons for now. Everything works and I do not think we are missing any functionality. I reported it here as it looks like a bug and I thought it should have been reported and addressed in the future releases of PySide.
            Using option A is not an option for us. we have an old pipeline with hundreds of .ui files dynamically loaded all over the place. It is also a very convenient way to build interfaces and I'm not sure why anyone would want to add an extra step and generate the python classes manually.

            1 Reply Last reply
            0

            3/5

            25 Oct 2024, 06:54

            • Login

            • Login or register to search.
            3 out of 5
            • First post
              3/5
              Last post
            0
            • Categories
            • Recent
            • Tags
            • Popular
            • Users
            • Groups
            • Search
            • Get Qt Extensions
            • Unsolved