wisconxing
16th November 2008, 02:55
In my QGraphicsScene object declare, I have draw a picture in drawBackground(), see below:
class MyScene : public QGraphicsScene
{
public:
MyScene(qreal x, qreal y, qreal w, qreal h)
: QGraphicsScene(x, y, w, h) { }
protected:
void drawBackground(QPainter *painter, const QRectF &rect)
{ //draw an old background
};
In my program running, I need redraw the background, how I will do?
Very Thanks
class MyScene : public QGraphicsScene
{
public:
MyScene(qreal x, qreal y, qreal w, qreal h)
: QGraphicsScene(x, y, w, h) { }
protected:
void drawBackground(QPainter *painter, const QRectF &rect)
{ //draw an old background
};
In my program running, I need redraw the background, how I will do?
Very Thanks