title: Run Windows PowerShell command with Qt
body: <p>Following <a href="https://superuser.com/a/812902/571029">this post</a>, I intent to run this command in my Qt 5.12.6 application on Windows 10 with admin privileges:</p>
  
  <pre class="lang-bsh prettyprint-override"><code>powershell -Command "agent.exe  -Verb runAs"
  </code></pre>
  
  <p>My <code>agent.exe</code> is next to my Qt application executable, i.e. its parent directory would be <code>QCoreApplication::applicationDirPath()</code>.</p>
  
  <hr>
  
  <p>Inspired by <a href="https://stackoverflow.com/a/3227845/3405291">another post</a>, my C++/Qt code looks like:</p>
  
  <pre class="lang-cpp prettyprint-override"><code>m_agent = new QProcess(this);
  
  QString agentName = "/agent.exe";
  // "agent.exe" executable is next to application executable
  QString agentPath = QCoreApplication::applicationDirPath() + agentName;
  QStringList args = QStringList();
  // I'm not sure how to compose `args`
  args &lt;&lt; "-Command"; // ?
  args &lt;&lt; agentPath; // ?
  args &lt;&lt; "-Verb"; // ?
  args &lt;&lt; "runAs"; // ?
  m_agent-&gt;start("powershell ", args);
  </code></pre>
  
  <p>My current <code>args</code>, composed above, is <em>not</em> starting the <code>agent.exe</code>.</p>
  
  <p>My questions is: how should I compose <code>args</code> to be able to run my Windows PowerShell command with Qt?</p>