[Qt Bug reported] App crashes on QDesktopServices::openUrl(QUrl("file:///C://folder)); if folder is empty
-
Since it crashes os OSX every time (even if the folder is non-empty) I filed a bug in JIRA:
-
The snippet from the bugreport works for me. Although, on Windows your path is wrong. These are the right calls:
@
QString path = QApplication::applicationDirPath() + "/somefolder";
QDesktopServices::openUrl(QUrl::fromLocalFile(path));
@You will hardly ever need native separators in Qt world.
In either case, I do not have crashes neither on windows nor on the mac.
-
Thanks for correcting me.
Since I use the pre-built SDK (not the obscure Frankenstein-Qt-build experiments from the other thread) I think it is worth a bugreport.
The funny thing is that the directory opens, then my application crashes. I added this detail to the Bugreport.