请教各位大虾,我继承QGraphicsView写了一个类,在该类中重载了paintevent函数,然后在paintevent函数中使用QPainter画图无效,debug信息为:
QPainter::begin: Paint device returned engine==0,type:1
QPainter::worldtransform: Painter not active
............
这个错误不是在paintevent函数以为使用QPainter出现的吗?
怎么我在paintevent中用还是出现了呢?
还是QGraphicsView不支持直接画图?
求教求教!谢谢!