Thanks jdob! Finally I got the thumbnails into my view by making them icons of QPushButton and lay them in their own widgets.
Is there any flag to control how the image got resized into icon? Right now it retains it's aspect ratio, leaving some grey color where it doesn't cover. I actually want it to cover the whole icon area, cropping out what's beyond instead. Is there a way to do so? Best regard, Panupat. On Tue, Aug 21, 2012 at 12:13 AM, jdob <[email protected]> wrote: > The simplest way to do this is probably using QLabel(s) for text and > images and laying them out in a QGridLayout. You'll have to use 2 QLabels > if you want to display both an image and text (since QLabel shows an image > or text but not both). In that case, you'll need to place your image and > text inside a QVBoxLayout and then add that layout to the grid. Then you > can wrap the grid layout inside a QScrollArea. > > Another (more flexible) way to solve this is using Qt's Graphics View > framework <http://qt-project.org/doc/qt-4.8/graphicsview.html>. Take a > look at QGraphicsPixmapItem and QGraphicsSimpleTextItem > > > On Monday, August 20, 2012 3:54:08 AM UTC-7, Panupat wrote: >> >> If I have a list of full path + image file names, how do I populate them >> as square thumbnails with text label into scrollable area? What class >> should I look at? Should I use QScrollArea for the wrapper? Something >> similar to sunday pipeline's >> http://www.3dg.dk/2011/08/12/**sunday-pipeline-maya-public/<http://www.3dg.dk/2011/08/12/sunday-pipeline-maya-public/> >> >> Thanks! >> > -- > view archives: http://groups.google.com/group/python_inside_maya > change your subscription settings: > http://groups.google.com/group/python_inside_maya/subscribe > -- view archives: http://groups.google.com/group/python_inside_maya change your subscription settings: http://groups.google.com/group/python_inside_maya/subscribe
