Qt QPainter::end: Painter ended whith 2 saced states

在使用Qt  QPainter 的时候,有时会遇到“QPainter::end: Painter ended whith 2 saced states”

这时由于我们在使用的QPanter.translate();函数,而在绘制结束的时候没有使用 restore()函数

出现QPainter::end: Painter ended whith 2 saced states 敬告,只需要在在绘制的结束的时候加上 restore() 函数就好了了

原文地址:https://www.cnblogs.com/DreamDog/p/9160130.html