Results 1 to 2 of 2

Thread: Reusing QPixmaps in QGraphicsPixmapItems - is it possible?

  1. #1
    Join Date
    May 2010
    Posts
    19
    Thanks
    3
    Thanked 1 Time in 1 Post
    Qt products
    Qt4
    Platforms
    Symbian S60

    Default Reusing QPixmaps in QGraphicsPixmapItems - is it possible?

    I need to create a block of QGraphicsPixmapItem's, all using the same QPixmap. Is there a way to do this so they all use the same QPixmap instead of the standard way which copies the pixmap to each item? It's using way too much memory in the phone at the moment.

  2. #2
    Join Date
    Jan 2006
    Location
    Warsaw, Poland
    Posts
    33,359
    Thanks
    3
    Thanked 5,015 Times in 4,792 Posts
    Qt products
    Qt3 Qt4 Qt5 Qt/Embedded
    Platforms
    Unix/X11 Windows Android Maemo/MeeGo
    Wiki edits
    10

    Default Re: Reusing QPixmaps in QGraphicsPixmapItems - is it possible?

    Pixmaps are implicitly shared, only one instance of the data will actually be used.
    Your biological and technological distinctiveness will be added to our own. Resistance is futile.

    Please ask Qt related questions on the forum and not using private messages or visitor messages.


  3. The following user says thank you to wysota for this useful post:

    Tito (5th October 2010)

Similar Threads

  1. Reusing the editing widget with QtItemDelegate
    By bcollie in forum Qt Programming
    Replies: 9
    Last Post: 1st June 2010, 14:52
  2. Replies: 0
    Last Post: 15th April 2010, 07:42
  3. Reusing a QPainterPath
    By Micawber in forum Qt Programming
    Replies: 2
    Last Post: 19th March 2009, 19:49
  4. QGraphicsPixmapItems through QGLWidget - clearing textures?
    By robertson1 in forum Qt Programming
    Replies: 1
    Last Post: 16th October 2008, 23:08
  5. Reusing .ts without source
    By langevin in forum Qt Programming
    Replies: 2
    Last Post: 21st December 2006, 17:57

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.