Sophie

Sophie

distrib > Mageia > 6 > armv5tl > media > core-updates > by-pkgid > 768f7d9f703884aa2562bf0a651086df > files > 664

qtbase5-doc-5.9.4-1.1.mga6.noarch.rpm

<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE html>
<html lang="en">
<head>
  <meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<!-- qstandardpaths.cpp -->
  <title>QStandardPaths Class | Qt Core 5.9</title>
  <link rel="stylesheet" type="text/css" href="style/offline-simple.css" />
  <script type="text/javascript">
    document.getElementsByTagName("link").item(0).setAttribute("href", "style/offline.css");
    // loading style sheet breaks anchors that were jumped to before
    // so force jumping to anchor again
    setTimeout(function() {
        var anchor = location.hash;
        // need to jump to different anchor first (e.g. none)
        location.hash = "#";
        setTimeout(function() {
            location.hash = anchor;
        }, 0);
    }, 0);
  </script>
</head>
<body>
<div class="header" id="qtdocheader">
  <div class="main">
    <div class="main-rounded">
      <div class="navigationbar">
        <table><tr>
<td >Qt 5.9</td><td ><a href="qtcore-index.html">Qt Core</a></td><td ><a href="qtcore-module.html">C++ Classes</a></td><td >QStandardPaths</td></tr></table><table class="buildversion"><tr>
<td id="buildversion" width="100%" align="right">Qt 5.9.4 Reference Documentation</td>
        </tr></table>
      </div>
    </div>
<div class="content">
<div class="line">
<div class="content mainContent">
<div class="sidebar">
<div class="toc">
<h3><a name="toc">Contents</a></h3>
<ul>
<li class="level1"><a href="#public-types">Public Types</a></li>
<li class="level1"><a href="#static-public-members">Static Public Members</a></li>
<li class="level1"><a href="#details">Detailed Description</a></li>
</ul>
</div>
<div class="sidebar-content" id="sidebar-content"></div></div>
<h1 class="title">QStandardPaths Class</h1>
<!-- $$$QStandardPaths-brief -->
<p>The <a href="qstandardpaths.html">QStandardPaths</a> class provides methods for accessing standard paths. <a href="#details">More...</a></p>
<!-- @@@QStandardPaths -->
<div class="table"><table class="alignedsummary">
<tr><td class="memItemLeft rightAlign topAlign"> Header:</td><td class="memItemRight bottomAlign">   <span class="preprocessor">#include &lt;QStandardPaths&gt;</span>
</td></tr><tr><td class="memItemLeft rightAlign topAlign"> qmake:</td><td class="memItemRight bottomAlign"> QT += core</td></tr><tr><td class="memItemLeft rightAlign topAlign"> Since:</td><td class="memItemRight bottomAlign">  Qt 5.0</td></tr></table></div><ul>
<li><a href="qstandardpaths-members.html">List of all members, including inherited members</a></li>
<li><a href="qstandardpaths-obsolete.html">Obsolete members</a></li>
</ul>
<a name="public-types"></a>
<h2 id="public-types">Public Types</h2>
<div class="table"><table class="alignedsummary">
<tr><td class="memItemLeft rightAlign topAlign"> enum </td><td class="memItemRight bottomAlign"><b><a href="qstandardpaths.html#LocateOption-enum">LocateOption</a></b> { LocateFile, LocateDirectory }</td></tr>
<tr><td class="memItemLeft rightAlign topAlign"> flags </td><td class="memItemRight bottomAlign"><b><a href="qstandardpaths.html#LocateOption-enum">LocateOptions</a></b></td></tr>
<tr><td class="memItemLeft rightAlign topAlign"> enum </td><td class="memItemRight bottomAlign"><b><a href="qstandardpaths.html#StandardLocation-enum">StandardLocation</a></b> { DesktopLocation, DocumentsLocation, FontsLocation, ApplicationsLocation, ..., AppConfigLocation }</td></tr>
</table></div>
<a name="static-public-members"></a>
<h2 id="static-public-members">Static Public Members</h2>
<div class="table"><table class="alignedsummary">
<tr><td class="memItemLeft rightAlign topAlign"> QString </td><td class="memItemRight bottomAlign"><b><a href="qstandardpaths.html#displayName">displayName</a></b>(StandardLocation <i>type</i>)</td></tr>
<tr><td class="memItemLeft rightAlign topAlign"> QString </td><td class="memItemRight bottomAlign"><b><a href="qstandardpaths.html#findExecutable">findExecutable</a></b>(const QString &amp;<i>executableName</i>, const QStringList &amp;<i>paths</i> = QStringList())</td></tr>
<tr><td class="memItemLeft rightAlign topAlign"> QString </td><td class="memItemRight bottomAlign"><b><a href="qstandardpaths.html#locate">locate</a></b>(StandardLocation <i>type</i>, const QString &amp;<i>fileName</i>, LocateOptions <i>options</i> = LocateFile)</td></tr>
<tr><td class="memItemLeft rightAlign topAlign"> QStringList </td><td class="memItemRight bottomAlign"><b><a href="qstandardpaths.html#locateAll">locateAll</a></b>(StandardLocation <i>type</i>, const QString &amp;<i>fileName</i>, LocateOptions <i>options</i> = LocateFile)</td></tr>
<tr><td class="memItemLeft rightAlign topAlign"> void </td><td class="memItemRight bottomAlign"><b><a href="qstandardpaths.html#setTestModeEnabled">setTestModeEnabled</a></b>(bool <i>testMode</i>)</td></tr>
<tr><td class="memItemLeft rightAlign topAlign"> QStringList </td><td class="memItemRight bottomAlign"><b><a href="qstandardpaths.html#standardLocations">standardLocations</a></b>(StandardLocation <i>type</i>)</td></tr>
<tr><td class="memItemLeft rightAlign topAlign"> QString </td><td class="memItemRight bottomAlign"><b><a href="qstandardpaths.html#writableLocation">writableLocation</a></b>(StandardLocation <i>type</i>)</td></tr>
</table></div>
<a name="details"></a>
<!-- $$$QStandardPaths-description -->
<div class="descr">
<h2 id="details">Detailed Description</h2>
<p>The <a href="qstandardpaths.html">QStandardPaths</a> class provides methods for accessing standard paths.</p>
<p>This class contains functions to query standard locations on the local filesystem, for common tasks such as user-specific directories or system-wide configuration directories.</p>
</div>
<!-- @@@QStandardPaths -->
<div class="types">
<h2>Member Type Documentation</h2>
<!-- $$$LocateOption$$$LocateFile$$$LocateDirectory -->
<h3 class="flags" id="LocateOption-enum"><a name="LocateOption-enum"></a>enum QStandardPaths::<span class="name">LocateOption</span><br/>flags QStandardPaths::<span class="name">LocateOptions</span></h3>
<p>This enum describes the different flags that can be used for controlling the behavior of <a href="qstandardpaths.html#locate">QStandardPaths::locate</a> and <a href="qstandardpaths.html#locateAll">QStandardPaths::locateAll</a>.</p>
<div class="table"><table class="valuelist"><tr valign="top" class="odd"><th class="tblConst">Constant</th><th class="tblval">Value</th><th class="tbldscr">Description</th></tr>
<tr><td class="topAlign"><code>QStandardPaths::LocateFile</code></td><td class="topAlign tblval"><code>0x0</code></td><td class="topAlign">return only files</td></tr>
<tr><td class="topAlign"><code>QStandardPaths::LocateDirectory</code></td><td class="topAlign tblval"><code>0x1</code></td><td class="topAlign">return only directories</td></tr>
</table></div>
<p>The LocateOptions type is a typedef for <a href="qflags.html">QFlags</a>&lt;LocateOption&gt;. It stores an OR combination of LocateOption values.</p>
<!-- @@@LocateOption -->
<!-- $$$StandardLocation$$$DesktopLocation$$$DocumentsLocation$$$FontsLocation$$$ApplicationsLocation$$$MusicLocation$$$MoviesLocation$$$PicturesLocation$$$TempLocation$$$HomeLocation$$$DataLocation$$$CacheLocation$$$GenericDataLocation$$$RuntimeLocation$$$ConfigLocation$$$DownloadLocation$$$GenericCacheLocation$$$GenericConfigLocation$$$AppDataLocation$$$AppConfigLocation$$$AppLocalDataLocation -->
<h3 class="fn" id="StandardLocation-enum"><a name="StandardLocation-enum"></a>enum QStandardPaths::<span class="name">StandardLocation</span></h3>
<p>This enum describes the different locations that can be queried using methods such as <a href="qstandardpaths.html#writableLocation">QStandardPaths::writableLocation</a>, <a href="qstandardpaths.html#standardLocations">QStandardPaths::standardLocations</a>, and <a href="qstandardpaths.html#displayName">QStandardPaths::displayName</a>.</p>
<p>Some of the values in this enum represent a user configuration. Such enum values will return the same paths in different applications, so they could be used to share data with other applications. Other values are specific to this application. Each enum value in the table below describes whether it's application-specific or generic.</p>
<p>Application-specific directories should be assumed to be unreachable by other applications. Therefore, files placed there might not be readable by other applications, even if run by the same user. On the other hand, generic directories should be assumed to be accessible by all applications run by this user, but should still be assumed to be unreachable by applications by other users.</p>
<p>Data interchange with other users is out of the scope of <a href="qstandardpaths.html">QStandardPaths</a>.</p>
<div class="table"><table class="valuelist"><tr valign="top" class="odd"><th class="tblConst">Constant</th><th class="tblval">Value</th><th class="tbldscr">Description</th></tr>
<tr><td class="topAlign"><code>QStandardPaths::DesktopLocation</code></td><td class="topAlign tblval"><code>0</code></td><td class="topAlign">Returns the user's desktop directory. This is a generic value. On systems with no concept of a desktop.</td></tr>
<tr><td class="topAlign"><code>QStandardPaths::DocumentsLocation</code></td><td class="topAlign tblval"><code>1</code></td><td class="topAlign">Returns the directory containing user document files. This is a generic value. The returned path is never empty.</td></tr>
<tr><td class="topAlign"><code>QStandardPaths::FontsLocation</code></td><td class="topAlign tblval"><code>2</code></td><td class="topAlign">Returns the directory containing user's fonts. This is a generic value. Note that installing fonts may require additional, platform-specific operations.</td></tr>
<tr><td class="topAlign"><code>QStandardPaths::ApplicationsLocation</code></td><td class="topAlign tblval"><code>3</code></td><td class="topAlign">Returns the directory containing the user applications (either executables, application bundles, or shortcuts to them). This is a generic value. Note that installing applications may require additional, platform-specific operations. Files, folders or shortcuts in this directory are platform-specific.</td></tr>
<tr><td class="topAlign"><code>QStandardPaths::MusicLocation</code></td><td class="topAlign tblval"><code>4</code></td><td class="topAlign">Returns the directory containing the user's music or other audio files. This is a generic value. If no directory specific for music files exists, a sensible fallback for storing user documents is returned.</td></tr>
<tr><td class="topAlign"><code>QStandardPaths::MoviesLocation</code></td><td class="topAlign tblval"><code>5</code></td><td class="topAlign">Returns the directory containing the user's movies and videos. This is a generic value. If no directory specific for movie files exists, a sensible fallback for storing user documents is returned.</td></tr>
<tr><td class="topAlign"><code>QStandardPaths::PicturesLocation</code></td><td class="topAlign tblval"><code>6</code></td><td class="topAlign">Returns the directory containing the user's pictures or photos. This is a generic value. If no directory specific for picture files exists, a sensible fallback for storing user documents is returned.</td></tr>
<tr><td class="topAlign"><code>QStandardPaths::TempLocation</code></td><td class="topAlign tblval"><code>7</code></td><td class="topAlign">Returns a directory where temporary files can be stored. The returned value might be application-specific, shared among other applications for this user, or even system-wide. The returned path is never empty.</td></tr>
<tr><td class="topAlign"><code>QStandardPaths::HomeLocation</code></td><td class="topAlign tblval"><code>8</code></td><td class="topAlign">Returns the user's home directory (the same as <a href="qdir.html#homePath">QDir::homePath</a>()). On Unix systems, this is equal to the HOME environment variable. This value might be generic or application-specific, but the returned path is never empty.</td></tr>
<tr><td class="topAlign"><code>QStandardPaths::DataLocation</code></td><td class="topAlign tblval"><code>9</code></td><td class="topAlign">Returns the same value as AppLocalDataLocation. This enumeration value is deprecated. Using AppDataLocation is preferable since on Windows, the roaming path is recommended.</td></tr>
<tr><td class="topAlign"><code>QStandardPaths::CacheLocation</code></td><td class="topAlign tblval"><code>10</code></td><td class="topAlign">Returns a directory location where user-specific non-essential (cached) data should be written. This is an application-specific directory. The returned path is never empty.</td></tr>
<tr><td class="topAlign"><code>QStandardPaths::GenericCacheLocation</code></td><td class="topAlign tblval"><code>15</code></td><td class="topAlign">Returns a directory location where user-specific non-essential (cached) data, shared across applications, should be written. This is a generic value. Note that the returned path may be empty if the system has no concept of shared cache.</td></tr>
<tr><td class="topAlign"><code>QStandardPaths::GenericDataLocation</code></td><td class="topAlign tblval"><code>11</code></td><td class="topAlign">Returns a directory location where persistent data shared across applications can be stored. This is a generic value. The returned path is never empty.</td></tr>
<tr><td class="topAlign"><code>QStandardPaths::RuntimeLocation</code></td><td class="topAlign tblval"><code>12</code></td><td class="topAlign">Returns a directory location where runtime communication files should be written, like Unix local sockets. This is a generic value. The returned path may be empty on some systems.</td></tr>
<tr><td class="topAlign"><code>QStandardPaths::ConfigLocation</code></td><td class="topAlign tblval"><code>13</code></td><td class="topAlign">Returns a directory location where user-specific configuration files should be written. This may be either a generic value or application-specific, and the returned path is never empty.</td></tr>
<tr><td class="topAlign"><code>QStandardPaths::DownloadLocation</code></td><td class="topAlign tblval"><code>14</code></td><td class="topAlign">Returns a directory for user's downloaded files. This is a generic value. If no directory specific for downloads exists, a sensible fallback for storing user documents is returned.</td></tr>
<tr><td class="topAlign"><code>QStandardPaths::GenericConfigLocation</code></td><td class="topAlign tblval"><code>16</code></td><td class="topAlign">Returns a directory location where user-specific configuration files shared between multiple applications should be written. This is a generic value and the returned path is never empty.</td></tr>
<tr><td class="topAlign"><code>QStandardPaths::AppDataLocation</code></td><td class="topAlign tblval"><code>17</code></td><td class="topAlign">Returns a directory location where persistent application data can be stored. This is an application-specific directory. To obtain a path to store data to be shared with other applications, use QStandardPaths::GenericDataLocation. The returned path is never empty. On the Windows operating system, this returns the roaming path. This enum value was added in Qt 5.4&#x2e;</td></tr>
<tr><td class="topAlign"><code>QStandardPaths::AppLocalDataLocation</code></td><td class="topAlign tblval"><code>DataLocation</code></td><td class="topAlign">Returns the local settings path on the Windows operating system. On all other platforms, it returns the same value as AppDataLocation. This enum value was added in Qt 5.4&#x2e;</td></tr>
<tr><td class="topAlign"><code>QStandardPaths::AppConfigLocation</code></td><td class="topAlign tblval"><code>18</code></td><td class="topAlign">Returns a directory location where user-specific configuration files should be written. This is an application-specific directory, and the returned path is never empty. This enum value was added in Qt 5.5&#x2e;</td></tr>
</table></div>
<p>The following table gives examples of paths on different operating systems. The first path is the writable path (unless noted). Other, additional paths, if any, represent non-writable locations.</p>
<div class="table"><table class="generic">
 <thead><tr class="qt-style"><th >Path type</th><th >macOS</th><th >Windows</th></tr></thead>
<tr valign="top" class="odd"><td >DesktopLocation</td><td >&quot;~/Desktop&quot;</td><td >&quot;C:/Users/&lt;USER&gt;/Desktop&quot;</td></tr>
<tr valign="top" class="even"><td >DocumentsLocation</td><td >&quot;~/Documents&quot;</td><td >&quot;C:/Users/&lt;USER&gt;/Documents&quot;</td></tr>
<tr valign="top" class="odd"><td >FontsLocation</td><td >&quot;/System/Library/Fonts&quot; (not writable)</td><td >&quot;C:/Windows/Fonts&quot; (not writable)</td></tr>
<tr valign="top" class="even"><td >ApplicationsLocation</td><td >&quot;/Applications&quot; (not writable)</td><td >&quot;C:/Users/&lt;USER&gt;/AppData/Roaming/Microsoft/Windows/Start Menu/Programs&quot;</td></tr>
<tr valign="top" class="odd"><td >MusicLocation</td><td >&quot;~/Music&quot;</td><td >&quot;C:/Users/&lt;USER&gt;/Music&quot;</td></tr>
<tr valign="top" class="even"><td >MoviesLocation</td><td >&quot;~/Movies&quot;</td><td >&quot;C:/Users/&lt;USER&gt;/Videos&quot;</td></tr>
<tr valign="top" class="odd"><td >PicturesLocation</td><td >&quot;~/Pictures&quot;</td><td >&quot;C:/Users/&lt;USER&gt;/Pictures&quot;</td></tr>
<tr valign="top" class="even"><td >TempLocation</td><td >randomly generated by the OS</td><td >&quot;C:/Users/&lt;USER&gt;/AppData/Local/Temp&quot;</td></tr>
<tr valign="top" class="odd"><td >HomeLocation</td><td >&quot;~&quot;</td><td >&quot;C:/Users/&lt;USER&gt;&quot;</td></tr>
<tr valign="top" class="even"><td >DataLocation</td><td >&quot;~/Library/Application Support/&lt;APPNAME&gt;&quot;, &quot;/Library/Application Support/&lt;APPNAME&gt;&quot;. &quot;&lt;APPDIR&gt;/../Resources&quot;</td><td >&quot;C:/Users/&lt;USER&gt;/AppData/Local/&lt;APPNAME&gt;&quot;, &quot;C:/ProgramData/&lt;APPNAME&gt;&quot;, &quot;&lt;APPDIR&gt;&quot;, &quot;&lt;APPDIR&gt;/data&quot;</td></tr>
<tr valign="top" class="odd"><td >CacheLocation</td><td >&quot;~/Library/Caches/&lt;APPNAME&gt;&quot;, &quot;/Library/Caches/&lt;APPNAME&gt;&quot;</td><td >&quot;C:/Users/&lt;USER&gt;/AppData/Local/&lt;APPNAME&gt;/cache&quot;</td></tr>
<tr valign="top" class="even"><td >GenericDataLocation</td><td >&quot;~/Library/Application Support&quot;, &quot;/Library/Application Support&quot;</td><td >&quot;C:/Users/&lt;USER&gt;/AppData/Local&quot;, &quot;C:/ProgramData&quot;, &quot;&lt;APPDIR&gt;&quot;, &quot;&lt;APPDIR&gt;/data&quot;</td></tr>
<tr valign="top" class="odd"><td >RuntimeLocation</td><td >&quot;~/Library/Application Support&quot;</td><td >&quot;C:/Users/&lt;USER&gt;&quot;</td></tr>
<tr valign="top" class="even"><td >ConfigLocation</td><td >&quot;~/Library/Preferences&quot;</td><td >&quot;C:/Users/&lt;USER&gt;/AppData/Local/&lt;APPNAME&gt;&quot;, &quot;C:/ProgramData/&lt;APPNAME&gt;&quot;</td></tr>
<tr valign="top" class="odd"><td >GenericConfigLocation</td><td >&quot;~/Library/Preferences&quot;</td><td >&quot;C:/Users/&lt;USER&gt;/AppData/Local&quot;, &quot;C:/ProgramData&quot;</td></tr>
<tr valign="top" class="even"><td >DownloadLocation</td><td >&quot;~/Downloads&quot;</td><td >&quot;C:/Users/&lt;USER&gt;/Documents&quot;</td></tr>
<tr valign="top" class="odd"><td >GenericCacheLocation</td><td >&quot;~/Library/Caches&quot;, &quot;/Library/Caches&quot;</td><td >&quot;C:/Users/&lt;USER&gt;/AppData/Local/cache&quot;</td></tr>
<tr valign="top" class="even"><td >AppDataLocation</td><td >&quot;~/Library/Application Support/&lt;APPNAME&gt;&quot;, &quot;/Library/Application Support/&lt;APPNAME&gt;&quot;. &quot;&lt;APPDIR&gt;/../Resources&quot;</td><td >&quot;C:/Users/&lt;USER&gt;/AppData/Roaming/&lt;APPNAME&gt;&quot;, &quot;C:/ProgramData/&lt;APPNAME&gt;&quot;, &quot;&lt;APPDIR&gt;&quot;, &quot;&lt;APPDIR&gt;/data&quot;</td></tr>
<tr valign="top" class="odd"><td >AppLocalDataLocation</td><td >&quot;~/Library/Application Support/&lt;APPNAME&gt;&quot;, &quot;/Library/Application Support/&lt;APPNAME&gt;&quot;. &quot;&lt;APPDIR&gt;/../Resources&quot;</td><td >&quot;C:/Users/&lt;USER&gt;/AppData/Local/&lt;APPNAME&gt;&quot;, &quot;C:/ProgramData/&lt;APPNAME&gt;&quot;, &quot;&lt;APPDIR&gt;&quot;, &quot;&lt;APPDIR&gt;/data&quot;</td></tr>
<tr valign="top" class="even"><td >AppConfigLocation</td><td >&quot;~/Library/Preferences/&lt;APPNAME&gt;&quot;</td><td >&quot;C:/Users/&lt;USER&gt;/AppData/Local/&lt;APPNAME&gt;&quot;, &quot;C:/ProgramData/&lt;APPNAME&gt;&quot;</td></tr>
</table></div>
<div class="table"><table class="generic">
 <thead><tr class="qt-style"><th >Path type</th><th >Linux</th></tr></thead>
<tr valign="top" class="odd"><td >DesktopLocation</td><td >&quot;~/Desktop&quot;</td></tr>
<tr valign="top" class="even"><td >DocumentsLocation</td><td >&quot;~/Documents&quot;</td></tr>
<tr valign="top" class="odd"><td >FontsLocation</td><td >&quot;~/.fonts&quot;</td></tr>
<tr valign="top" class="even"><td >ApplicationsLocation</td><td >&quot;~/.local/share/applications&quot;, &quot;/usr/local/share/applications&quot;, &quot;/usr/share/applications&quot;</td></tr>
<tr valign="top" class="odd"><td >MusicLocation</td><td >&quot;~/Music&quot;</td></tr>
<tr valign="top" class="even"><td >MoviesLocation</td><td >&quot;~/Videos&quot;</td></tr>
<tr valign="top" class="odd"><td >PicturesLocation</td><td >&quot;~/Pictures&quot;</td></tr>
<tr valign="top" class="even"><td >TempLocation</td><td >&quot;/tmp&quot;</td></tr>
<tr valign="top" class="odd"><td >HomeLocation</td><td >&quot;~&quot;</td></tr>
<tr valign="top" class="even"><td >DataLocation</td><td >&quot;~/.local/share/&lt;APPNAME&gt;&quot;, &quot;/usr/local/share/&lt;APPNAME&gt;&quot;, &quot;/usr/share/&lt;APPNAME&gt;&quot;</td></tr>
<tr valign="top" class="odd"><td >CacheLocation</td><td >&quot;~/.cache/&lt;APPNAME&gt;&quot;</td></tr>
<tr valign="top" class="even"><td >GenericDataLocation</td><td >&quot;~/.local/share&quot;, &quot;/usr/local/share&quot;, &quot;/usr/share&quot;</td></tr>
<tr valign="top" class="odd"><td >RuntimeLocation</td><td >&quot;/run/user/&lt;USER&gt;&quot;</td></tr>
<tr valign="top" class="even"><td >ConfigLocation</td><td >&quot;~/.config&quot;, &quot;/etc/xdg&quot;</td></tr>
<tr valign="top" class="odd"><td >GenericConfigLocation</td><td >&quot;~/.config&quot;, &quot;/etc/xdg&quot;</td></tr>
<tr valign="top" class="even"><td >DownloadLocation</td><td >&quot;~/Downloads&quot;</td></tr>
<tr valign="top" class="odd"><td >GenericCacheLocation</td><td >&quot;~/.cache&quot;</td></tr>
<tr valign="top" class="even"><td >AppDataLocation</td><td >&quot;~/.local/share/&lt;APPNAME&gt;&quot;, &quot;/usr/local/share/&lt;APPNAME&gt;&quot;, &quot;/usr/share/&lt;APPNAME&gt;&quot;</td></tr>
<tr valign="top" class="odd"><td >AppLocalDataLocation</td><td >&quot;~/.local/share/&lt;APPNAME&gt;&quot;, &quot;/usr/local/share/&lt;APPNAME&gt;&quot;, &quot;/usr/share/&lt;APPNAME&gt;&quot;</td></tr>
<tr valign="top" class="even"><td >AppConfigLocation</td><td >&quot;~/.config/&lt;APPNAME&gt;&quot;, &quot;/etc/xdg/&lt;APPNAME&gt;&quot;</td></tr>
</table></div>
<div class="table"><table class="generic">
 <thead><tr class="qt-style"><th >Path type</th><th >Android</th><th >iOS</th></tr></thead>
<tr valign="top" class="odd"><td >DesktopLocation</td><td >&quot;&lt;APPROOT&gt;/files&quot;</td><td >&quot;&lt;APPROOT&gt;/Documents/Desktop&quot;</td></tr>
<tr valign="top" class="even"><td >DocumentsLocation</td><td >&quot;&lt;USER&gt;/Documents&quot;, &quot;&lt;USER&gt;/&lt;APPNAME&gt;/Documents&quot;</td><td >&quot;&lt;APPROOT&gt;/Documents&quot;</td></tr>
<tr valign="top" class="odd"><td >FontsLocation</td><td >&quot;/system/fonts&quot; (not writable)</td><td >&quot;&lt;APPROOT&gt;/Library/Fonts&quot;</td></tr>
<tr valign="top" class="even"><td >ApplicationsLocation</td><td >not supported (directory not readable)</td><td >not supported</td></tr>
<tr valign="top" class="odd"><td >MusicLocation</td><td >&quot;&lt;USER&gt;/Music&quot;, &quot;&lt;USER&gt;/&lt;APPNAME&gt;/Music&quot;</td><td >&quot;&lt;APPROOT&gt;/Documents/Music&quot;</td></tr>
<tr valign="top" class="even"><td >MoviesLocation</td><td >&quot;&lt;USER&gt;/Movies&quot;, &quot;&lt;USER&gt;/&lt;APPNAME&gt;/Movies&quot;</td><td >&quot;&lt;APPROOT&gt;/Documents/Movies&quot;</td></tr>
<tr valign="top" class="odd"><td >PicturesLocation</td><td >&quot;&lt;USER&gt;/Pictures&quot;, &quot;&lt;USER&gt;/&lt;APPNAME&gt;/Pictures&quot;</td><td >&quot;&lt;APPROOT&gt;/Documents/Pictures&quot;, &quot;assets-library://&quot;</td></tr>
<tr valign="top" class="even"><td >TempLocation</td><td >&quot;&lt;APPROOT&gt;/cache&quot;</td><td >&quot;&lt;APPROOT&gt;/tmp&quot;</td></tr>
<tr valign="top" class="odd"><td >HomeLocation</td><td >&quot;&lt;APPROOT&gt;/files&quot;</td><td >&quot;&lt;APPROOT&gt;&quot; (not writable)</td></tr>
<tr valign="top" class="even"><td >DataLocation</td><td >&quot;&lt;APPROOT&gt;/files&quot;, &quot;&lt;USER&gt;/&lt;APPNAME&gt;/files&quot;</td><td >&quot;&lt;APPROOT&gt;/Library/Application Support&quot;</td></tr>
<tr valign="top" class="odd"><td >CacheLocation</td><td >&quot;&lt;APPROOT&gt;/cache&quot;, &quot;&lt;USER&gt;/&lt;APPNAME&gt;/cache&quot;</td><td >&quot;&lt;APPROOT&gt;/Library/Caches&quot;</td></tr>
<tr valign="top" class="even"><td >GenericDataLocation</td><td >&quot;&lt;USER&gt;&quot;</td><td >&quot;&lt;APPROOT&gt;/Documents&quot;</td></tr>
<tr valign="top" class="odd"><td >RuntimeLocation</td><td >&quot;&lt;APPROOT&gt;/cache&quot;</td><td >not supported</td></tr>
<tr valign="top" class="even"><td >ConfigLocation</td><td >&quot;&lt;APPROOT&gt;/files/settings&quot;</td><td >&quot;&lt;APPROOT&gt;/Library/Preferences&quot;</td></tr>
<tr valign="top" class="odd"><td >GenericConfigLocation</td><td >&quot;&lt;APPROOT&gt;/files/settings&quot; (there is no shared settings)</td><td >&quot;&lt;APPROOT&gt;/Library/Preferences&quot;</td></tr>
<tr valign="top" class="even"><td >DownloadLocation</td><td >&quot;&lt;USER&gt;/Downloads&quot;, &quot;&lt;USER&gt;/&lt;APPNAME&gt;/Downloads&quot;</td><td >&quot;&lt;APPROOT&gt;/Documents/Downloads&quot;</td></tr>
<tr valign="top" class="odd"><td >GenericCacheLocation</td><td >&quot;&lt;APPROOT&gt;/cache&quot; (there is no shared cache)</td><td >&quot;&lt;APPROOT&gt;/Library/Caches&quot;</td></tr>
<tr valign="top" class="even"><td >AppDataLocation</td><td >&quot;&lt;APPROOT&gt;/files&quot;, &quot;&lt;USER&gt;/&lt;APPNAME&gt;/files&quot;</td><td >&quot;&lt;APPROOT&gt;/Library/Application Support&quot;</td></tr>
<tr valign="top" class="odd"><td >AppConfigLocation</td><td >&quot;&lt;APPROOT&gt;/files/settings&quot;</td><td >&quot;&lt;APPROOT&gt;/Library/Preferences/&lt;APPNAME&gt;&quot;</td></tr>
<tr valign="top" class="even"><td >AppLocalDataLocation</td><td >&quot;&lt;APPROOT&gt;/files&quot;, &quot;&lt;USER&gt;/&lt;APPNAME&gt;/files&quot;</td><td >&quot;&lt;APPROOT&gt;/Library/Application Support&quot;</td></tr>
</table></div>
<p>In the table above, <code>&lt;APPNAME&gt;</code> is usually the organization name, the application name, or both, or a unique name generated at packaging. Similarly, &lt;APPROOT&gt; is the location where this application is installed (often a sandbox). &lt;APPDIR&gt; is the directory containing the application executable.</p>
<p>The paths above should not be relied upon, as they may change according to OS configuration, locale, or they may change in future Qt versions.</p>
<p><b>Note: </b>On Android, applications with open files on the external storage (&lt;USER&gt; locations), will be killed if the external storage is unmounted.</p><p><b>Note: </b>On iOS, if you do pass <code>QStandardPaths::standardLocations(QStandardPaths::PicturesLocation).last()</code> as argument to <a href="../qtwidgets/qfiledialog.html#setDirectory-1">QFileDialog::setDirectory</a>(), a native image picker dialog will be used for accessing the user's photo album. The filename returned can be loaded using <a href="qfile.html">QFile</a> and related APIs. This feature was added in Qt 5.5&#x2e;</p><p><b>See also </b><a href="qstandardpaths.html#writableLocation">writableLocation</a>(), <a href="qstandardpaths.html#standardLocations">standardLocations</a>(), <a href="qstandardpaths.html#displayName">displayName</a>(), <a href="qstandardpaths.html#locate">locate</a>(), and <a href="qstandardpaths.html#locateAll">locateAll</a>().</p>
<!-- @@@StandardLocation -->
</div>
<div class="func">
<h2>Member Function Documentation</h2>
<!-- $$$displayName[overload1]$$$displayNameStandardLocation -->
<h3 class="fn" id="displayName"><a name="displayName"></a><code>[static] </code><span class="type"><a href="qstring.html">QString</a></span> QStandardPaths::<span class="name">displayName</span>(<span class="type"><a href="qstandardpaths.html#StandardLocation-enum">StandardLocation</a></span> <i>type</i>)</h3>
<p>Returns a localized display name for the given location <i>type</i> or an empty <a href="qstring.html">QString</a> if no relevant location can be found.</p>
<!-- @@@displayName -->
<!-- $$$findExecutable[overload1]$$$findExecutableconstQString&constQStringList& -->
<h3 class="fn" id="findExecutable"><a name="findExecutable"></a><code>[static] </code><span class="type"><a href="qstring.html">QString</a></span> QStandardPaths::<span class="name">findExecutable</span>(const <span class="type"><a href="qstring.html">QString</a></span> &amp;<i>executableName</i>, const <span class="type"><a href="qstringlist.html">QStringList</a></span> &amp;<i>paths</i> = QStringList())</h3>
<p>Finds the executable named <i>executableName</i> in the paths specified by <i>paths</i>, or the system paths if <i>paths</i> is empty.</p>
<p>On most operating systems the system path is determined by the PATH environment variable.</p>
<p>The directories where to search for the executable can be set in the <i>paths</i> argument. To search in both your own paths and the system paths, call findExecutable twice, once with <i>paths</i> set and once with <i>paths</i> empty.</p>
<p>Symlinks are not resolved, in order to preserve behavior for the case of executables whose behavior depends on the name they are invoked with.</p>
<p><b>Note: </b>On Windows, the usual executable extensions (from the PATHEXT environment variable) are automatically appended, so that for instance findExecutable(&quot;foo&quot;) will find foo.exe or foo.bat if present.</p><p>Returns the absolute file path to the executable, or an empty string if not found.</p>
<!-- @@@findExecutable -->
<!-- $$$locate[overload1]$$$locateStandardLocationconstQString&LocateOptions -->
<h3 class="fn" id="locate"><a name="locate"></a><code>[static] </code><span class="type"><a href="qstring.html">QString</a></span> QStandardPaths::<span class="name">locate</span>(<span class="type"><a href="qstandardpaths.html#StandardLocation-enum">StandardLocation</a></span> <i>type</i>, const <span class="type"><a href="qstring.html">QString</a></span> &amp;<i>fileName</i>, <span class="type"><a href="qstandardpaths.html#LocateOption-enum">LocateOptions</a></span> <i>options</i> = LocateFile)</h3>
<p>Tries to find a file or directory called <i>fileName</i> in the standard locations for <i>type</i>.</p>
<p>The full path to the first file or directory (depending on <i>options</i>) found is returned. If no such file or directory can be found, an empty string is returned.</p>
<!-- @@@locate -->
<!-- $$$locateAll[overload1]$$$locateAllStandardLocationconstQString&LocateOptions -->
<h3 class="fn" id="locateAll"><a name="locateAll"></a><code>[static] </code><span class="type"><a href="qstringlist.html">QStringList</a></span> QStandardPaths::<span class="name">locateAll</span>(<span class="type"><a href="qstandardpaths.html#StandardLocation-enum">StandardLocation</a></span> <i>type</i>, const <span class="type"><a href="qstring.html">QString</a></span> &amp;<i>fileName</i>, <span class="type"><a href="qstandardpaths.html#LocateOption-enum">LocateOptions</a></span> <i>options</i> = LocateFile)</h3>
<p>Tries to find all files or directories called <i>fileName</i> in the standard locations for <i>type</i>.</p>
<p>The <i>options</i> flag allows to specify whether to look for files or directories.</p>
<p>Returns the list of all the files that were found.</p>
<!-- @@@locateAll -->
<!-- $$$setTestModeEnabled[overload1]$$$setTestModeEnabledbool -->
<h3 class="fn" id="setTestModeEnabled"><a name="setTestModeEnabled"></a><code>[static] </code><span class="type">void</span> QStandardPaths::<span class="name">setTestModeEnabled</span>(<span class="type">bool</span> <i>testMode</i>)</h3>
<p>If <i>testMode</i> is true, this enables a special &quot;test mode&quot; in <a href="qstandardpaths.html">QStandardPaths</a>, which changes writable locations to point to test directories, in order to prevent auto tests from reading from or writing to the current user's configuration.</p>
<p>This affects the locations into which test programs might write files: <a href="qstandardpaths.html#StandardLocation-enum">GenericDataLocation</a>, <a href="qstandardpaths.html#StandardLocation-enum">DataLocation</a>, <a href="qstandardpaths.html#StandardLocation-enum">ConfigLocation</a>, <a href="qstandardpaths.html#StandardLocation-enum">GenericConfigLocation</a>, <a href="qstandardpaths.html#StandardLocation-enum">AppConfigLocation</a>, <a href="qstandardpaths.html#StandardLocation-enum">GenericCacheLocation</a>, <a href="qstandardpaths.html#StandardLocation-enum">CacheLocation</a>. Other locations are not affected.</p>
<p>On Unix, <code>XDG_DATA_HOME</code> is set to <i>~/.qttest/share</i>, <code>XDG_CONFIG_HOME</code> is set to <i>~/.qttest/config</i>, and <code>XDG_CACHE_HOME</code> is set to <i>~/.qttest/cache</i>.</p>
<p>On macOS, data goes to <i>~/.qttest/Application</i> Support, cache goes to <i>~/.qttest/Cache</i>, and config goes to <i>~/.qttest/Preferences</i>.</p>
<p>On Windows, everything goes to a &quot;qttest&quot; directory under Application Data.</p>
<!-- @@@setTestModeEnabled -->
<!-- $$$standardLocations[overload1]$$$standardLocationsStandardLocation -->
<h3 class="fn" id="standardLocations"><a name="standardLocations"></a><code>[static] </code><span class="type"><a href="qstringlist.html">QStringList</a></span> QStandardPaths::<span class="name">standardLocations</span>(<span class="type"><a href="qstandardpaths.html#StandardLocation-enum">StandardLocation</a></span> <i>type</i>)</h3>
<p>Returns all the directories where files of <i>type</i> belong.</p>
<p>The list of directories is sorted from high to low priority, starting with <a href="qstandardpaths.html#writableLocation">writableLocation</a>() if it can be determined. This list is empty if no locations for <i>type</i> are defined.</p>
<p><b>See also </b><a href="qstandardpaths.html#writableLocation">writableLocation</a>().</p>
<!-- @@@standardLocations -->
<!-- $$$writableLocation[overload1]$$$writableLocationStandardLocation -->
<h3 class="fn" id="writableLocation"><a name="writableLocation"></a><code>[static] </code><span class="type"><a href="qstring.html">QString</a></span> QStandardPaths::<span class="name">writableLocation</span>(<span class="type"><a href="qstandardpaths.html#StandardLocation-enum">StandardLocation</a></span> <i>type</i>)</h3>
<p>Returns the directory where files of <i>type</i> should be written to, or an empty string if the location cannot be determined.</p>
<p><b>Note: </b>The storage location returned can be a directory that does not exist; i.e&#x2e;, it may need to be created by the system or the user.</p><!-- @@@writableLocation -->
</div>
        </div>
       </div>
   </div>
   </div>
</div>
<div class="footer">
   <p>
   <acronym title="Copyright">&copy;</acronym> 2017 The Qt Company Ltd.
   Documentation contributions included herein are the copyrights of
   their respective owners.<br>    The documentation provided herein is licensed under the terms of the    <a href="http://www.gnu.org/licenses/fdl.html">GNU Free Documentation    License version 1.3</a> as published by the Free Software Foundation.<br>    Qt and respective logos are trademarks of The Qt Company Ltd.     in Finland and/or other countries worldwide. All other trademarks are property
   of their respective owners. </p>
</div>
</body>
</html>