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
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?