Results 1 to 4 of 4

Thread: How to redraw QGraphicsScene background in running

Threaded View

Previous Post Previous Post   Next Post Next Post
  1. #1
    Join Date
    Nov 2008
    Posts
    10
    Qt products
    Qt4
    Platforms
    Windows

    Default How to redraw QGraphicsScene background in running

    In my QGraphicsScene object declare, I have draw a picture in drawBackground(), see below:
    Qt Code:
    1. class MyScene : public QGraphicsScene
    2. {
    3. public:
    4. MyScene(qreal x, qreal y, qreal w, qreal h)
    5. : QGraphicsScene(x, y, w, h) { }
    6.  
    7. protected:
    8. void drawBackground(QPainter *painter, const QRectF &rect)
    9. { //draw an old background
    10. };
    To copy to clipboard, switch view to plain text mode 

    In my program running, I need redraw the background, how I will do?
    Very Thanks
    Last edited by wysota; 16th November 2008 at 09:43. Reason: missing [code] tags

Similar Threads

  1. OpenGL texture on QGraphicsScene background
    By Ovnan in forum Qt Programming
    Replies: 5
    Last Post: 11th July 2008, 10:39
  2. Moving the QGraphicsScene background content
    By maverick_pol in forum Qt Programming
    Replies: 5
    Last Post: 16th May 2008, 07:37

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
Digia, Qt and their respective logos are trademarks of Digia Plc in Finland and/or other countries worldwide.