added mime filetype in qtreeview

This commit is contained in:
2023-03-04 19:12:13 +01:00
parent 927c4a932a
commit 711ca7d1cd
3 changed files with 28 additions and 65 deletions
+7 -1
View File
@@ -71,4 +71,10 @@ bool testRsyncReturn(MainWindow * w, QProcess * myProcess)
return false;
}
QString getFileType(QString filename)
{
QMimeDatabase db;
QMimeType mime = db.mimeTypeForFile(filename);
QString returnValue = mime.name().section('/',1 ,1);
return returnValue;
}