首页 > 代码库 > QPainter::begin: Paint device returned engine == 0, type: 2

QPainter::begin: Paint device returned engine == 0, type: 2

QPainter::begin: Paint device returned engine == 0, type: 2
QPainter::setCompositionMode: Painter not active
QPainter::end: Painter not active, aborted

 

一般是由于QPainter操作的绘图对象为空,将绘图对象初始化即可。