Results 1 to 7 of 7

Thread: system gets struced when add 1000+ QPixmap items to scene

Threaded View

Previous Post Previous Post   Next Post Next Post
  1. #3
    Join Date
    Jan 2006
    Location
    Graz, Austria
    Posts
    8,416
    Thanks
    37
    Thanked 1,544 Times in 1,494 Posts
    Qt products
    Qt3 Qt4 Qt5
    Platforms
    Unix/X11 Windows

    Default Re: system gets struced when add 1000+ QPixmap items to scene

    You probably want to scale the image, not the pixmap item.

    You are currently scaling the by 0.1 in both dimensions, reducing the visible image to a hundreth of its orginal size. But you still keep the image in its full size.

    If you scale the image and then create the pixmap item, each item will only have the thumbnail image to hold.

    Something you could try additionally is to use a QListView in icon view mode and write a simple list model that returns thumbnail images as Qt:ecorationRole value.

    That way the list view can decide which images it needs to fill its area and you only need to load and scale those.

    Cheers,
    _

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

    prasad.ece2 (20th March 2014)

Similar Threads

  1. How to make some items non movable on scene
    By tarunrajsingh in forum Qt Programming
    Replies: 8
    Last Post: 17th April 2013, 21:44
  2. Saving QGraphics Scene items
    By chaltier in forum Qt Programming
    Replies: 1
    Last Post: 3rd April 2012, 06:35
  3. adding QPixmap to scene
    By rogerholmes in forum Qt Programming
    Replies: 3
    Last Post: 6th June 2009, 05:45
  4. add items into scene
    By Noxxik in forum Qt Programming
    Replies: 0
    Last Post: 9th March 2009, 16:32
  5. Can't move Items in the scene
    By maverick_pol in forum Qt Programming
    Replies: 2
    Last Post: 16th May 2008, 09:40

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.