Dear all,

I am trying to do shut down from within my application. I am using the following code to do so:
Qt Code:
  1. QProcess fQuitter
  2. QString program = "/usr/bin/osascript";
  3. QStringList arguments;
  4. arguments << "-e" << "'tell application \"Finder\" to shut down'";
  5. fQuitter.start(program, arguments);
  6. fQuitter.waitForFinished();
To copy to clipboard, switch view to plain text mode 

readAllStandardError() returns this:
0:1: syntax error: A unknown token can’t go here. (-2740)

If I copy&paste the same strings into the terminal it works.

Any suggestions?
Markus