这个错误产生的原因其实很简单,就是因为你尝试去画一个图,但是没有在paintevent里面去做。
所以只要把代码放到paintevent函数里面就好啦。
paintevent函数是一个可以重载的函数哦。
报错:
QWidget::paintEngine: Should no longer be called
QPainter::begin: Paint device returned engine == 0, type: 1
<
这个错误产生的原因其实很简单,就是因为你尝试去画一个图,但是没有在paintevent里面去做。
所以只要把代码放到paintevent函数里面就好啦。
paintevent函数是一个可以重载的函数哦。
报错:
QWidget::paintEngine: Should no longer be called
QPainter::begin: Paint device returned engine == 0, type: 1
<