[SOLVED] QFileDialog::getExistingDirectory under windows - directory character
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.
You can try
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.