Details
-
Bug
-
Resolution: Done
-
P2: Important
-
5.3.2, 5.4.0 RC
-
Mac OS X 10.9.5
-
-
7d43fb0c10726be005325a4b5c79b3d7f7722c37
Description
When calling update() explicitly in transparent widget it doesn't clear background before paintEvent on Mac. Erasing works fine for example resizing window that updates widget. Test with attached example by resizing painted rectangle in transparent window. Old painted rectangle is not erased until resizing the window. Same code works fine on Windows so should work also on Mac.
There's also workaround to erase rect before painting other items:
void paintEvent(QPaintEvent* e) { QPainter painter(this); // WORKAROUND FOR MAC OS X: painter.setCompositionMode(QPainter::CompositionMode_Clear); painter.eraseRect(rect()); painter.setCompositionMode(QPainter::CompositionMode_SourceOver);