QPainter::end: Painter ended with 2 saved states 问题解决方法 (如有新方法,不断更新)

在运行analogclock程序过程中,出现了QPainter::endPainter ended with 2 saved states,告警信息不断在console中刷心,后检查为程序中有一处没有配对出现save()、restore()方法造成。
原文地址:https://www.cnblogs.com/weiweiqiao99/p/1879771.html