QFileInfo : set relative path for a file in current directory.
Solved
General and Desktop
-
Hi,
How can I set relative path of a file in current directory to QFileInfo?
I tried like
QFileInfo qfi("./"+filename);
But it did not work.QFileInfo qfi(filename);
should work.
Are you sure current directory is the one you assume it should be?
Check it with http://doc.qt.io/qt-5.7/qdir.html#currentPath -
QFileInfo qfi(filename);
should work.
Are you sure current directory is the one you assume it should be?
Check it with http://doc.qt.io/qt-5.7/qdir.html#currentPath