I want to upgrade my project from Qt 5.7 to Qt5.8. I have a function which shows an image on a QListWidget
.
My project, a viewer makes a thumbnail from image and convert it to a QIcon
. After creating the QIcon
it is added to the QListWidget
by inserting a new QListwidgetItem
.
In 5.7 that worked well, but in 5.8 thumbnails are not shown.
Belows are codes
QIcon
to QListWidget
:
QIcon tmpIcon(pathOfImage);
ui.listWidget->addItem(new QListWidgetItem(tmpIcon, pathOfImage));
What makes this happen? How can I adjust to 5.8?
In 5.7 it works:
In 5.8 it doesnt:
But right now, I found that small size of PNG can be shown in 5.8.
I don't know what is the problem. Maybe the size or the format of the image?
In 5.7 that didn't affect the QListwidget
!