Results 1 to 2 of 2

Thread: QGraphicsPixmapItem repaint immediately

  1. #1
    Join Date
    Aug 2012
    Posts
    1
    Qt products
    Qt3 Qt4
    Platforms
    Unix/X11 Windows

    Question QGraphicsPixmapItem repaint immediately

    I use a QGraphicsPixmapItem to hold an image, and a scene holds the item, and a view is attached to the scene. The problem is that when I modify the image and call the item->update(), scene->update(), view->update(), the widget does no change at all. I think it is because the "update" will not immediately call the paint, so does anyone have some solutions?
    Thanks!

  2. #2
    Join Date
    Sep 2009
    Location
    Wroclaw, Poland
    Posts
    1,394
    Thanked 342 Times in 324 Posts
    Qt products
    Qt4 Qt5
    Platforms
    MacOS X Unix/X11 Windows Android

    Default Re: QGraphicsPixmapItem repaint immediately

    If you change the QPixmap object, you will have to call setPixmap() again in order to see the changes in graphics item - QGraphicsPixmapItem doesn't have access to your original pixmap.

Similar Threads

  1. QSound can not play immediately
    By thanhluanbk88 in forum Qt Programming
    Replies: 2
    Last Post: 21st March 2011, 10:16
  2. Replies: 4
    Last Post: 17th October 2010, 23:30
  3. [+] does not show up immediately
    By yuriry in forum Qt Programming
    Replies: 4
    Last Post: 4th October 2008, 20:14
  4. Dialog closes immediately
    By bruccutler in forum Qt Programming
    Replies: 5
    Last Post: 22nd February 2007, 00:18
  5. forcing QResizeEvent to come immediately
    By tpomorsk in forum Qt Programming
    Replies: 5
    Last Post: 14th September 2006, 17:39

Tags for this Thread

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.