Details
-
Bug
-
Resolution: Invalid
-
P1: Critical
-
None
-
6.2.2
-
None
Description
QLabel::setText overwrites the previously displayed text when the text is updated:
QLabels above are added on a form in Qt designer and then added onto one tab of a QTabWidget at runtime. The text overwrite is not visible when the the tab / form is first displayed, but when navigating back from another tab or just updating the label values.
Result is consistent on MacOs and Linux. Have not tried on Windows.
Have tried using QLabel::clear() and QLabel::repaint() before QLabel::setText() without success.
----------------------------------------------------------------------------Added later
Minimal Example:
Please find attached.
Cause:
Re-adding a Form into the same cell of a QGridLayout, without first deleting the previous previous Form, causes the new Form to overwrite the previous Form (causing the updated label text to be overwritten).
Expected:
Would be ideal if the cell area can be reset to the background color before a new form (forms have transparent backgrounds by default) is displayed in the cell area. Failing which, it would be nice if this behavior was documented, possibly as part of the QGridLayout::addWidget() method.