Question

i want to get all the files that are located in a specified directory but without their extensions at the end .I did this Qt Code:

QDir myDir(mConfigDirectory);

         filters << "*.ini";
         myDir.setNameFilters(filters);
     list = myDir.entryList ();
    qDebug()<<list;

but i can't find the way to separate the name from the extension and get only names?!

Was it helpful?

Solution

QFileInfo Class doesn't help in this case? See QString QFileInfo::baseName

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top