forgot to setup the environment using 'qmake -projects'
Solved
General and Desktop
-
Success !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
QStringList fileNames;
if (dialog.exec()) {
fileNames = dialog.selectedFiles();
// ".exactMatch" is discontinued in Qt6 so i am using @Christian-Ehrlicher suggestion ".
QStringList str = fileNames;
if (str.endsWith(".jpeg")){
return;
}
i don't want to break this now working windows program but, if i wanted to test for 'bmp' and 'png' file extensions
would it look something like:
if (str.endsWith(".jpeg"||".bmp"||".png"))thanks to @SGaist @Pl45m4 @Christian-Ehrlicher for all the this help and to forum readers who didn't make snide remaks.
-
-
You would either have multiple or statements using endsWith or use QRegularExpression.