Best way to create a thumbnail viewer
I need to create a thumbnail viewer where the images are stored as QByteArray (I convert this to QPixmap and QImage). I have successfully created a thumbnail viewer using a QListWidget that I add QListWidgetItems to (see code below).
QIcon thumnail = QIcon(Pixmap::fromImage(image));
QListWidgetItem* newItem= new QListWidgetItem(ui_.thumbnailWindow);
// ui_.thumbnailWindow is a QListWidget added in design mode
However, I am having problems updating this QListWidget when I want so I would like to try something else. Have any of you any suggestions?
bq. I am having problems updating this QListWidget when I want
What's exactly the problem?
see my other post "My QListWidget is not updating when I want"....
I have connected a signal to a slot. In the slot the QListWidget is cleared before the newItems are added to the QListWidget.
I have verified that the slot is actually activated by using QDebug()... So it is just the screen that is not updated. The signal is emitted from a Widget #1 and the slot is for a Widget #2....
Did you understand the problem? Are signals and slots not thread safe?