Important: Please read the Qt Code of Conduct - https://forum.qt.io/topic/113070/qt-code-of-conduct
[SOLVED] QFileDialog::getExistingDirectory under windows - directory character
Harry123 last edited by Harry123
I am using QFileDialog::getOpenFileName under Windows and I noticed that the returned file-name looks like
As this might be confusing to the end-user, how do I specify that I would like it in the form of
I hope I don't need to do string-replacement of
\- that some standard way exists to get the native form of the path to the file.
michelson last edited by
You can try
Harry123 last edited by
Thanks, this seems to be the one. I never thought to look in QDir.
I verified the code, and the QDir::toNativeSeparators function will act on any string, not only on directory names, just doing on Windows a very simple-minded replace-string.