Results 1 to 2 of 2

Thread: QScrollArea not displaying large number of images

  1. #1

    Question QScrollArea not displaying large number of images

    I have a custom widget for displaying thumbnail images. The widget stops displaying when there is a large number of images.

    1. The widget is a subclass of QScrollArea
    2. A QFrame widget is instantiated and is set as the main scroll widget
    3. A QGridLayout widget is instantiated and is the main layout widget
    4. For each thumbnail image, a QLabel is created and added to the grid layout. Currently there is only one row with 0..n columns. THe rowSpan and columnSpan size is 3
    5. I am adding the label widgets with this call
    gridLayout->addWidget( label, row, column, 3, 3);

    The images are displayed correctly until the number of images exceeds 40. When attempting to display more images, none of the images are displayed. Is there a scroll area size that needs to be set?

    Thanks

  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: QScrollArea not displaying large number of images

    If you set the widgetResizable property to true then the frame would be resized without problems.

    By the way, did you think about using QGraphicsView instead of QScrollArea and labels?
    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.


Similar Threads

  1. Load Images in a dir into a QScrollArea
    By nmuntz in forum Qt Programming
    Replies: 3
    Last Post: 20th January 2009, 22:03
  2. Problem with displaying jpeg and gif images, in QT4
    By node_ex in forum Installation and Deployment
    Replies: 1
    Last Post: 23rd September 2008, 16:29
  3. import large number of images
    By sriluyarlagadda in forum Qt Programming
    Replies: 5
    Last Post: 15th May 2008, 11:26
  4. KDE/QWT doubt on debian sarge
    By hildebrand in forum KDE Forum
    Replies: 13
    Last Post: 25th April 2007, 07:13
  5. Displaying real time images
    By Sheetal in forum Qt Programming
    Replies: 9
    Last Post: 22nd February 2007, 12:29

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.