上传者: xiaojian_001
|
上传时间: 2021-05-24 14:51:36
|
文件大小: 1.28MB
|
文件类型: TAR
基于多线程的机制实现图片缩略图的显示。
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();