I have recently stumbled upon a few bugs in Qt 5.12.4 release builds only. In debug build, it works as expected. Attached the source code to reproduce the problems.
I have a QTestWidget which is trying to custom paint some text on the screen but the painting is somehow messed up.
Another problem is if I create a QPainterPath with a addRoundedRect() it is not painted properly. Although addRect() works fine.
The same code does use to work fine in Qt 5.6.0 both in debug and release.