{
QDir *dir = new QDir(strPath);
QStringList filter;
filter << "*bmp";
dir->setNameFilters(filter); //only consider *bmp file
QList<QFileInfo> *fileInfo = new QList<QFileInfo>(dir->entryInfoList(filter));
int count = fileInfo->count();
for(int i = 0; i < count; i++)
{
if(fileInfo->at(i).fileName() == lImageName ||
fileInfo->at(i).fileName() == rImageName)
{
dir->remove(fileInfo->at(i).fileName());
qDebug() << "remove: " << fileInfo->at(i).fileName();
}
}
}