Search code examples
qt4qstringqdir

how to get the list of files without their extensions in a specified directory in Qt


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?!


Solution

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