<html><head><meta http-equiv="Content-Type" content="text/html; charset=utf-8"></head><body style="word-wrap: break-word; -webkit-nbsp-mode: space; line-break: after-white-space;" class="">I only use whatever is built by Conda or pip. I’m not aware what they build against, but I had naively assumed there was some correspondence between PyQt5 and Qt5 versions. There is some version information here: <a href="https://bugreports.qt.io/browse/QTBUG-68740" class="">https://bugreports.qt.io/browse/QTBUG-68740</a> and <a href="https://bugreports.qt.io/browse/QTBUG-68521" class="">https://bugreports.qt.io/browse/QTBUG-68521</a>.<div class=""><br class=""></div><div class="">Ray<br class=""><div><br class=""><blockquote type="cite" class=""><div class="">On Sep 17, 2020, at 7:19 AM, Phil Thompson <<a href="mailto:phil@riverbankcomputing.com" class="">phil@riverbankcomputing.com</a>> wrote:</div><br class="Apple-interchange-newline"><div class=""><div class="">On 17/09/2020 13:04, Raymond Osborn wrote:<br class=""><blockquote type="cite" class="">The repaint issue has been a problem on Macs for a couple of years<br class="">affecting PyQt5 since v5.11 at least. I am still on Mac OS 10.14. Here<br class="">is a link to a Qt Forum post in 2018 -<br class=""><a href="https://forum.qt.io/topic/98059/push-button-label-settext-not-refreshing-under-macos" class="">https://forum.qt.io/topic/98059/push-button-label-settext-not-refreshing-under-macos</a><br class=""><https://forum.qt.io/topic/98059/push-button-label-settext-not-refreshing-under-macos>.<br class="">I’m not sure if it affected Mac OS 10,13. It doesn’t affect PyQt 5.9.<br class="">I have had to subclass most of the PyQt5 widgets that I use to add a<br class="">repaint whenever they are updated programmatically.<br class="">Ray<br class=""></blockquote><br class="">To clarify, it's not the version of PyQt that is the problem, it is the version of Qt that PyQt is built against that is the problem.<br class=""><br class="">Phil<br class=""><br class=""><br class=""><blockquote type="cite" class=""><blockquote type="cite" class="">On Sep 17, 2020, at 4:12 AM, Phil Thompson <<a href="mailto:phil@riverbankcomputing.com" class="">phil@riverbankcomputing.com</a>> wrote:<br class="">On 17/09/2020 09:46, Jeremy Katz wrote:<br class=""><blockquote type="cite" class="">On 17/Sep/20 01:08, Jeremy Katz wrote:<br class=""><blockquote type="cite" class="">On 15/Sep/20 06:29, Phil Thompson wrote:<br class="">[...]<br class=""><blockquote type="cite" class="">However I am currently at a loss about what is happening. I am using a<br class="">version of PyQt that only uses "plain" Qt classes which does not allow<br class="">Python re-implementations of C++ virtuals. This means that while the Qt<br class="">event loop is running (ie. in the call to exec()), *no* PyQt is executed<br class="">- yet the problem still exists. It's almost as if the very presence of<br class="">Python is having an effect.<br class="">Any insight would be welcome...<br class="">Phil<br class=""></blockquote>Short version:<br class="">Setting the environment variable QT_MAC_WANTS_LAYER to 1 may fix the<br class="">issue for macOS 10.15. The code at<br class=""><a href="https://code.woboq.org/qt5/qtbase/src/plugins/platforms/cocoa/qnsview_drawing.mm.html#108" class="">https://code.woboq.org/qt5/qtbase/src/plugins/platforms/cocoa/qnsview_drawing.mm.html#108</a><br class="">indicates this won't work for 10.14.<br class=""></blockquote>Setting the style with QApplication.setStyle() or the command line<br class="">-style option also works. Both the fusion and windows styles function as<br class="">expected. Explicitly using the macintosh style results in the rendering<br class="">defect. I still don't know how the dark mode mac style is invoked, or<br class="">why it works while the light mode style does not.<br class=""></blockquote>Setting QT_MAC_WANTS_LAYER or using fusion both work for me. Building against Qt v5.9 also works.<br class="">Whether this is a genuine Qt bug, or just an unresolved clash between Qt and Python settings on macOS is difficult to say.<br class="">Setting QT_MAC_WANTS_LAYER in the PyQt initialisation seems a reasonable workaround.<br class="">Does anybody know if the problems exists on macOS 10.14 and earlier?<br class="">Phil<br class=""></blockquote></blockquote></div></div></blockquote></div><br class=""></div></body></html>