在paintEvent中,使用QPainter * 绘制图像出现此问题。解决:
1、改为不使用QPainter指针。
2、添上begin(), end()
QPainter * painter = new QPainter();
painter->begin (this);//!!!
painter->drawLine (...);
painter->end ();//!!!
2023-11-26 10:00:09
在paintEvent中,使用QPainter * 绘制图像出现此问题。解决:
1、改为不使用QPainter指针。
2、添上begin(), end()
QPainter * painter = new QPainter();
painter->begin (this);//!!!
painter->drawLine (...);
painter->end ();//!!!