Priority: P2: Important
Affects Version/s: 5.11.0
Fix Version/s: None
Component/s: Widgets: Widgets and Dialogs
I'm experiencing an issue with Qt 5.11.0 on on MacOS 10.13 where widgets are not redrawing after setText() is called. This problem did not exist in Qt 5.10.0, so it seems to have been introduced in 5.11.0. The problem occurs only on MacOS, and does not occur on Windows 8.1 or Linux Mint Cinnamon.
Example Program To Illustrate Problem
Here is a short program to demonstrate the issue:
Clicking the "Abort" button causes the abort() function to be called, which changes the text on the two QLables and the QPushButton. However, on MacOS only the label1 text changes, and the label2 text and button text remain unchanged. This can be seen on the attached screenshot.
If you cover the dialog box with another window, then uncover it, the window will redraw with both QLables and the QPushButton all updated to the text set in abort(). It therefore seems that the text is being set but the widgets are not being redrawn until a redraw is triggered by covering and uncovering the window.
Running the same program on Windows or Linux with Qt 5.11.0 the problem does not occur and all three widgets update immediately upon pressing the "Abort" button. Testing the program on MacOS with Qt 5.10.0 the three widgets again update immediately when the "Abort" button is pressed. The issue is therefore exclusive to Qt 5.11.0 on MacOS.
Other Redraw Issues
At the bottom of the screenshot I have shown another redraw issue. In that example I commented out the three lines involving label1, ran the program and clicked the "Abort" button. As you can see, label2 has updated but parts of the original text still remain. It therefore appears that there are other general redraw issues in Qt 5.11.0 on MacOS that weren't present in Qt 5.10.0.