2 Attachment(s)
Display icons with text on a listwidget uniformly
Hi,
I add thumbanil images to a list widget and display the same in an icon mode along with text. However, due to the aspect ratio of the thumnails , i get the images up and down and not in a uniform line. Could you please help me ? I have attached the image of how it is now and how i want it to be
HOW IT IS NOW
Attachment 11892
HOW IT SHOULD LOOK
Attachment 11893
Snippet of how i add the files to the list widget
Code:
// list the files in the list widget in the icon mode
for (int i=1; i<imgList.size(); ++i)
{
QString imgPath
= scaledDirPath.
absoluteFilePath(imgList
[i
]);
ui->FilesList->setWordWrap(true);
QString origImageName
= (imgList
[i
].
remove("_scaled", Qt
::CaseSensitive));
item->setTextAlignment(Qt::AlignBottom);
ui->FilesList->setGridSize(grid);
}
Any help is appreciated
Thanks
Gayathri