QPaintDevice: Cannot destroy paint device that is being painted

在paintEvent中,使用QPainter * 绘制图像出现此问题。解决:

1、改为不使用QPainter指针。

2、添上begin(), end()

QPainter * painter = new QPainter();
painter->begin (this);//!!!
painter->drawLine (...);
painter->end ();//!!!
上一篇:Linux 文件及目录管理命令基础


下一篇:LINUX文件及目录管理命令基础