QLabel is not updated unless the mainWindow is unfocused

the issue is present in PyQt5 since 5.11.0 (tested 5.11.x, 5.12.x and 5.13) and PySide2 v.5.13 on MacOS (tested 10.14 and 10.12.6).
The v.5.10.1 works fine.
The issue does not exist under Linux and Windows
Adding a call to the repaint method fix the issue.

def setTextHelloWorld(self):
    self.label.setText("Hello World")
    self.label.repaint()

Leave a Comment