By default, qpainter can only be called in paintevent,:
Draw a form in other events with the following prompt:
Qpainter: Begin: paint device returned engine = 0, type: 1
The painting operation should be completed in paintevent.
There is a property value. You can set it in the constructor to draw out of paintevent:
This-> setattribute (QT: wa_paintoutsidepaintevent );
But only X11 is supported. For Windows, Mac OS X or embedded Linux .... Not Supported
Void XX: paintevent (qpaintevent * P)
{
Painter. Begin (this );
Painter. drawimage (image );
Painter. End ();
}
By default, qpainter can only be called in paintevent,:
Draw a form in other events with the following prompt:
Qpainter: Begin: paint device returned engine = 0, type: 1
The painting operation should be completed in paintevent.
There is a property value. You can set it in the constructor to draw out of paintevent:
This-> setattribute (QT: wa_paintoutsidepaintevent );
But only X11 is supported. For Windows, Mac OS X or embedded Linux .... Not Supported
Void XX: paintevent (qpaintevent * P)
{
Painter. Begin (this );
Painter. drawimage (image );
Painter. End ();
}