Details
-
Bug
-
Resolution: Out of scope
-
Not Evaluated
-
None
-
5.13.2
-
None
-
I am on MacOS with Python 3.7, pyqt version 5.13.0, qt version 5.13.0
Description
This is described completely in this stack overflow item with source code and solutions. The answerer pointed out that the problem did not exist in 5.10.1 but fails in 5.13.2 and suggested I report it here.
Here is a brief summary based on the image below,
If I use QCheckBox.setChecked(True) to initialize a box to "checked" before the application is running the blue background in the box is missing as in "set with Python code" in the image. But if the user checks the box then the blue background is present, as in "Set by user clicking".
A workaround is to use
QTimer.singleShot(500, lambda: self.setwithPythoncode.setChecked(True))
Apparently, during the 500 msec delay the setup code completes and the application has reached the running state.