title: How can I get "ProgramData" path using QStandardPaths
body: <p>Is there a way to get <code>ProgramData</code> path in QT using <code>QStandardPaths</code>.</p>
  
  <p>Details:</p>
  
  <ol>
  <li>I want to know how to get <code>ProgramData</code> path by using functions of QStandardPaths class.</li>
  <li>I want cross-platform solution, that is why I want to use QStandardPaths. I believe QT provides such a solution but I could not find it.</li>
  <li>People may ask why I want that, or may suggest it is not good to use <code>ProgramData</code> path. First of all, I am planning to copy there user-independent config file of my app. I want all users to be able to reach that file, only for reading. I am going to locate necessary files in setup step. (We can discuss that situation though, if this is not a good way to do it)</li>
  </ol>
  
  <p>What I have tried already:</p>
  
  <ol>
  <li><p><code>QStringList locations = QStandardPaths::locateAll(QStandardPaths::DataLocation, QString(), QStandardPaths::LocateDirectory);</code></p></li>
  <li><p><code>QStringList locations2 = QStandardPaths::standardLocations(QStandardPaths::DataLocation);</code></p></li>
  <li><p>I tried to run my QT as admin (to see if problem is due to some privilege issue) and nothing has changed </p></li>
  </ol>
  
  <p>With the functions from point 1 and 2 I also tried to use <code>QStandardPaths::GenericDataLocation</code> as a standard location type. Actually, I have tried all types in <a href="http://doc.qt.io/qt-5/qstandardpaths.html" rel="nofollow">this</a> link which has "ProgramData" in its explanations   </p>
  
  <p>At the end, all I get are:</p>
  
  <ol>
  <li><blockquote>
    <p>C:/Users/myUser/AppData/{Local|Roaming}</p>
  </blockquote></li>
  <li><blockquote>
    <p>/Data</p>
  </blockquote></li>
  <li>empty <code>QString</code>.</li>
  </ol>