Qt中從檔案的完整路徑擷取檔案名的方法:
QString currentFile = FilePath.right(FilePath.size() - FilePath.lastIndexOf('/') - 1);
Qt中ListWidget中删掉listwidget的某些項:
QListWidgetItem* item = listWidget->takeItem(i);
delete item;
就可以删除了。