AbsPath() is not member of QDir
-
am opening a QFileDialog where am browsing a .dat file
and from that file i have to read data
after browsing the file am getting the file name as
QString filename = /home/act/sou/project/"ace.dat"i need only the ace.dat file name
so by using QDir d;
d.absPath(filename);
i wanted to get only the filename instead of whole path
but when am doing this by the above code
it is showing the error as absPath() is not a member of QDir
Though i have used "qdir.h" in my header filehow should i do it to get only file name
please suggest me
thanking u
-
Please checkout the documentation of "QDir::absolutePath":http://qt-project.org/doc/qt-5.0/qtcore/qdir.html#absolutePath
respectively "QDir::absoluteFilePath":http://qt-project.org/doc/qt-5.0/qtcore/qdir.html#absoluteFilePath