基于多线程的机制实现图片缩略图的显示。
QThread* thread = new ThumbnailThread(filename, 10 - waitseconds);
waitseconds ++;
connect(thread, SIGNAL(thumbnailFinished(QImage)), this, SLOT(addThumbnail(QImage)));
connect(thread, SIGNAL(thumbnailFailed(const QString)), this, SLOT(showError(const QString)));
connect(thread, SIGNAL(finished()), this, SLOT(deleteThread()));
thread->start();
2021-05-24 14:51:36
1.28MB
QT
多线程
图片
1