Results 1 to 7 of 7

Thread: Get a QGraphicsPixmapItem from a Scene and modify(change the image).

Threaded View

Previous Post Previous Post   Next Post Next Post
  1. #4
    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: Get a QGraphicsPixmapItem from a Scene and modify(change the image).

    Use qgraphicsitem_cast on pointer returned by itemAt method.
    Qt Code:
    1. QGraphicsPixmapItem * pixmap = qgraphicsitem_cast<QGraphicsPixmapItem*>(scene->itemAt(pos));
    2. if (pixmap){
    3. ....
    4. }
    To copy to clipboard, switch view to plain text mode 

  2. The following user says thank you to stampede for this useful post:

    vitaR (23rd March 2014)

Similar Threads

  1. Replies: 4
    Last Post: 15th May 2013, 13:58
  2. Modify image to have round corners
    By migel in forum Newbie
    Replies: 1
    Last Post: 4th September 2012, 11:38
  3. How to delete a QGraphicsPixmapItem in a scene.
    By newqtuser in forum Qt Programming
    Replies: 3
    Last Post: 9th July 2009, 08:07
  4. Removing a QGraphicsPixmapItem from a scene
    By newqtuser in forum Qt Programming
    Replies: 2
    Last Post: 12th July 2008, 22:54
  5. Replies: 32
    Last Post: 30th March 2008, 20:00

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
  •  
Qt is a trademark of The Qt Company.