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()

Argument 1 has unexpected type ‘NoneType’?

As suggested by user3030010 and ekhumoro it expects a callable function. In which case you should replace that argument with lambda: mixCocktail(“string”) AND ALSO don’t use str it’s a python built-in datatype I have replaced it with _str import sys from PyQt5.QtWidgets import QApplication, QPushButton, QAction from PyQt5.QtCore import QObject, pyqtSignal from PyQt5.QtGui import * … Read more