Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- const FileName explorer = Environment::systemEnvironment().searchInPath(QLatin1String("explorer.exe"));
- if (explorer.isEmpty()) {
- QMessageBox::warning(parent,
- QApplication::translate("Core::Internal",
- "Launching Windows Explorer Failed"),
- QApplication::translate("Core::Internal",
- "Could not find explorer.exe in path to launch Windows Explorer."));
- return;
- }
- QStringList param;
- if (!fileInfo.isDir())
- param += QLatin1String("/select,");
- param += QDir::toNativeSeparators(fileInfo.canonicalFilePath());
- QProcess::startDetached(explorer.toString(), param);
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement