Qt中从文件的完整路径获取文件名的方法:
QString currentFile = FilePath.right(FilePath.size() - FilePath.lastIndexOf('/') - 1);
Qt中ListWidget中删掉listwidget的某些项:
QListWidgetItem* item = listWidget->takeItem(i);
delete item;
就可以删除了。
Qt中从文件的完整路径获取文件名的方法:
QString currentFile = FilePath.right(FilePath.size() - FilePath.lastIndexOf('/') - 1);
Qt中ListWidget中删掉listwidget的某些项:
QListWidgetItem* item = listWidget->takeItem(i);
delete item;
就可以删除了。