Important: Please read the Qt Code of Conduct - https://forum.qt.io/topic/113070/qt-code-of-conduct

PyQt / Pyside2 commitment to Mac OS?



  • I've just started using PyQt5 / Pyside2 for Cross Platform development, and my development OS is Mac OS. I was surprised to pretty quickly run into what looks like a Mac specific bug that has been around since version 5.10:

    https://stackoverflow.com/questions/62530793/pyqt-widget-refresh-behavior-different-when-clicking-button-with-mouse-or-keyboa

    I ran into a similar problem, and the same workaround solved the problem. It struck me that this problem was seemingly introduced several versions ago and is still unresolved. It made me question the commitment to MacOS for these toolsets.

    Can anyone comment? And also, which toolset is preferred in this case - PyQt5 or Pyside2?

    Thanks for any help. It's an exciting option for test support, which is my application for it at present, and it would be nice to know it has legs.


  • Moderators

    Hi @jandyman, and welcome!

    macOS is one of the primary platforms supported by Qt: https://doc.qt.io/qt-5/supported-platforms.html In particular, macOS 10.15 + XCode 11 is a reference configuration -- That means resources are allocated to perform Continuous Integration (CI) to ensure that all patches to Qt work on that platform.

    Despite the CI process, bugs and regressions do slip through simply because Qt (both the core C++ layer and the Python bindings) are such huge pieces of software.

    You can check the list of recently-resolved issues that affect macOS :

    which toolset is preferred in this case - PyQt5 or Pyside2?

    Pyside2 is supported by the Qt Company (which also supports the underlying C++ layer). PyQt5 is supported by Riverbank Computing.

    Pyside2 is available under the LGPLv3, GPLv3, or commercial licenses. PyQt5 is available under the GPLv3 or commercial licenses only (no LGPL).

    Both toolsets do roughly the same thing, so I can't really say what's "preferred".

    It struck me that this problem was seemingly introduced several versions ago and is still unresolved.

    Bugfixing efforts are prioritised by impact, not by age. It's also affected by how easy it is to track down the cause of the bug.

    Your particular issue looks like a strange, niche one. It was originally discovered in the core C++ layer and was apparently fixed. However, it sounds like a similar effect still persists in the Python bindings: https://bugreports.qt.io/browse/PYSIDE-695 It is not clear to me whether this is related to the original C++ issue or not. Someone has to dive into it to investigate, but it hasn't happened yet.

    According to that bug report, a simpler workaround is to call app.setStyle('Fusion') at the start of your code instead of injecting repaint() everywhere. Can you please check if that works for you?

    Also, you can vote on the bug report to let the devs know that you're impacted by it. (You can log in using the same credentials for this forum)

    It's an exciting option for test support, which is my application for it at present, and it would be nice to know it has legs.

    Agreed; welcome to a world of possibilities!

    Let us know if you have any other concerns.



  • Thanks so much for prompt reply. It makes me feel better about investing effort in this approach.

    I checked and app.setStyle('Fusion') also works, and it is much simpler.

    I'll vote on the bug report, it wasn't at all difficult to run across this bug, which is why it surprised me in the first place.

    Edit: I tried to go vote on the, but I cannot figure out how


  • Moderators

    @jandyman said in PyQt / Pyside2 commitment to Mac OS?:

    I checked and app.setStyle('Fusion') also works, and it is much simpler.

    Great! Thanks for trying.

    I'll vote on the bug report

    Edit: I tried to go vote on the, but I cannot figure out how

    1. Go to https://bugreports.qt.io/browse/PYSIDE-695
    2. Click "Log In" on the top-right corner of the page
    3. (You'll probably be taken to the home page after logging in) Navigate to https://bugreports.qt.io/browse/PYSIDE-695 again
    4. Click "Vote for this issue" on the middle-right of the page

    It would also be helpful to post a comment stating your versions of macOS + Python + Pyside, and letting the devs know that app.setStyle('Fusion') worked for you

    it wasn't at all difficult to run across this bug, which is why it surprised me in the first place.

    I'm just glad that it's also easy to work around the bug.


Log in to reply