Important: Please read the Qt Code of Conduct - https://forum.qt.io/topic/113070/qt-code-of-conduct
How to force painting of a widget?
jesuisbenjamin last edited by
I would like to apply a mask (a QWidget) on top of page (QLabels) that are visible within a QScrollArea.
To do this I check whether they are visible after the mask is requested then send an Page.mask.update(). In some cases however eg. if two pages are visible simultaneously, only one page gets the event while the other is pending and appears only later when scrolling or so.
The output of few string from my application shows the process:
@page 8 is visible, hence repaint.
page 9 is visible, hence repaint.
Mask of page 9 received paint event
region to paint is PyQt4.QtCore.QRect(0, 0, 100, 30)
Mask of page 8 received paint event
region to paint is PyQt4.QtCore.QRect(0, 0, 531, 194)
I tried to replace the update() method call by repaint(), but that doesn't help.
What can I do to force this mask to be repainted?