Skip to content

Instantly share code, notes, and snippets.

@ZeldaZach
Created April 12, 2015 21:53
Show Gist options
  • Select an option

  • Save ZeldaZach/19cc82f78493acf421b7 to your computer and use it in GitHub Desktop.

Select an option

Save ZeldaZach/19cc82f78493acf421b7 to your computer and use it in GitHub Desktop.
Open in finder from QT
#if defined(Q_OS_MAC)
QStringList scriptArgs;
scriptArgs << QLatin1String("-e");
scriptArgs << QString::fromLatin1("tell application \"Finder\" to open POSIX file \"%1\"").arg(settingsCache->getPicsPath() + "/CUSTOM/");
scriptArgs << QLatin1String("-e");
scriptArgs << QLatin1String("tell application \"Finder\" to activate");
QProcess::execute("/usr/bin/osascript", scriptArgs);
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment