Widgets are not updated - is this a bug?

Jeremy Katz jkatz at volexity.com
Thu Sep 17 09:46:39 BST 2020



On 17/Sep/20 01:08, Jeremy Katz wrote:
> On 15/Sep/20 06:29, Phil Thompson wrote:
> 
> [...]
>>
>> However I am currently at a loss about what is happening. I am using a
>> version of PyQt that only uses "plain" Qt classes which does not allow
>> Python re-implementations of C++ virtuals. This means that while the Qt
>> event loop is running (ie. in the call to exec()), *no* PyQt is executed
>> - yet the problem still exists. It's almost as if the very presence of
>> Python is having an effect.
>>
>> Any insight would be welcome...
>>
>> Phil
> 
> 
> Short version:
> 
> Setting the environment variable QT_MAC_WANTS_LAYER to 1 may fix the
> issue for macOS 10.15. The code at
> https://code.woboq.org/qt5/qtbase/src/plugins/platforms/cocoa/qnsview_drawing.mm.html#108
> indicates this won't work for 10.14.

Setting the style with QApplication.setStyle() or the command line
-style option also works. Both the fusion and windows styles function as
expected. Explicitly using the macintosh style results in the rendering
defect. I still don't know how the dark mode mac style is invoked, or
why it works while the light mode style does not.


More information about the PyQt mailing list