Sophie

Sophie

distrib > Mageia > 7 > x86_64 > by-pkgid > 1dd17e0d683ef79b4bb6872bbf359d7f > files > 6332

qt4-doc-4.8.7-26.2.mga7.noarch.rpm

<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en_US" lang="en_US">
<head>
  <meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<!-- qsettings.cpp -->
  <title>Qt 4.8: QSettings Class Reference</title>
  <link rel="stylesheet" type="text/css" href="style/style.css" />
  <script src="scripts/jquery.js" type="text/javascript"></script>
  <script src="scripts/functions.js" type="text/javascript"></script>
  <link rel="stylesheet" type="text/css" href="style/superfish.css" />
  <link rel="stylesheet" type="text/css" href="style/narrow.css" />
  <!--[if IE]>
<meta name="MSSmartTagsPreventParsing" content="true">
<meta http-equiv="imagetoolbar" content="no">
<![endif]-->
<!--[if lt IE 7]>
<link rel="stylesheet" type="text/css" href="style/style_ie6.css">
<![endif]-->
<!--[if IE 7]>
<link rel="stylesheet" type="text/css" href="style/style_ie7.css">
<![endif]-->
<!--[if IE 8]>
<link rel="stylesheet" type="text/css" href="style/style_ie8.css">
<![endif]-->

<script src="scripts/superfish.js" type="text/javascript"></script>
<script src="scripts/narrow.js" type="text/javascript"></script>

</head>
<body class="" onload="CheckEmptyAndLoadList();">
 <div class="header" id="qtdocheader">
    <div class="content"> 
    <div id="nav-logo">
      <a href="index.html">Home</a></div>
    <a href="index.html" class="qtref"><span>Qt Reference Documentation</span></a>
    <div id="narrowsearch"></div>
    <div id="nav-topright">
      <ul>
        <li class="nav-topright-home"><a href="http://qt.digia.com/">Qt HOME</a></li>
        <li class="nav-topright-dev"><a href="http://qt-project.org/">DEV</a></li>
        <li class="nav-topright-doc nav-topright-doc-active"><a href="http://qt-project.org/doc/">
          DOC</a></li>
        <li class="nav-topright-blog"><a href="http://blog.qt.digia.com/">BLOG</a></li>
      </ul>
    </div>
    <div id="shortCut">
      <ul>
        <li class="shortCut-topleft-inactive"><span><a href="index.html">Qt 4.8</a></span></li>
        <li class="shortCut-topleft-active"><a href="http://qt-project.org/doc/">ALL VERSIONS        </a></li>
      </ul>
     </div>
 <ul class="sf-menu" id="narrowmenu"> 
             <li><a href="#">API Lookup</a> 
                 <ul> 
                     <li><a href="classes.html">Class index</a></li> 
           <li><a href="functions.html">Function index</a></li> 
           <li><a href="modules.html">Modules</a></li> 
           <li><a href="namespaces.html">Namespaces</a></li> 
           <li><a href="qtglobal.html">Global Declarations</a></li> 
           <li><a href="qdeclarativeelements.html">QML elements</a></li> 
             </ul> 
             </li> 
             <li><a href="#">Qt Topics</a> 
                 <ul> 
                        <li><a href="qt-basic-concepts.html">Programming with Qt</a></li>  
                        <li><a href="qtquick.html">Device UIs &amp; Qt Quick</a></li>  
                        <li><a href="qt-gui-concepts.html">UI Design with Qt</a></li>  
                        <li><a href="supported-platforms.html">Supported Platforms</a></li>  
                        <li><a href="technology-apis.html">Qt and Key Technologies</a></li>  
                        <li><a href="best-practices.html">How-To's and Best Practices</a></li>  
              </ul> 
                 </li> 
                 <li><a href="#">Examples</a> 
                     <ul> 
                       <li><a href="all-examples.html">Examples</a></li> 
                       <li><a href="tutorials.html">Tutorials</a></li> 
                       <li><a href="demos.html">Demos</a></li> 
                       <li><a href="qdeclarativeexamples.html">QML Examples</a></li> 
                </ul> 
                     </li> 
                 </ul> 
    </div>
  </div>
  <div class="wrapper">
    <div class="hd">
      <span></span>
    </div>
    <div class="bd group">
      <div class="sidebar">
        <div class="searchlabel">
          Search index:</div>
        <div class="search" id="sidebarsearch">
          <form id="qtdocsearch" action="" onsubmit="return false;">
            <fieldset>
              <input type="text" name="searchstring" id="pageType" value="" />
 <div id="resultdialog"> 
 <a href="#" id="resultclose">Close</a> 
 <p id="resultlinks" class="all"><a href="#" id="showallresults">All</a> | <a href="#" id="showapiresults">API</a> | <a href="#" id="showarticleresults">Articles</a> | <a href="#" id="showexampleresults">Examples</a></p> 
 <p id="searchcount" class="all"><span id="resultcount"></span><span id="apicount"></span><span id="articlecount"></span><span id="examplecount"></span>&nbsp;results:</p> 
 <ul id="resultlist" class="all"> 
 </ul> 
 </div> 
            </fieldset>
          </form>
        </div>
        <div class="box first bottombar" id="lookup">
          <h2 title="API Lookup"><span></span>
            API Lookup</h2>
          <div  id="list001" class="list">
          <ul id="ul001" >
              <li class="defaultLink"><a href="classes.html">Class index</a></li>
              <li class="defaultLink"><a href="functions.html">Function index</a></li>
              <li class="defaultLink"><a href="modules.html">Modules</a></li>
              <li class="defaultLink"><a href="namespaces.html">Namespaces</a></li>
              <li class="defaultLink"><a href="qtglobal.html">Global Declarations</a></li>
              <li class="defaultLink"><a href="qdeclarativeelements.html">QML elements</a></li>
            </ul> 
          </div>
        </div>
        <div class="box bottombar" id="topics">
          <h2 title="Qt Topics"><span></span>
            Qt Topics</h2>
          <div id="list002" class="list">
            <ul id="ul002" >
               <li class="defaultLink"><a href="qt-basic-concepts.html">Programming with Qt</a></li> 
               <li class="defaultLink"><a href="qtquick.html">Device UIs &amp; Qt Quick</a></li> 
               <li class="defaultLink"><a href="qt-gui-concepts.html">UI Design with Qt</a></li> 
               <li class="defaultLink"><a href="supported-platforms.html">Supported Platforms</a></li>  
               <li class="defaultLink"><a href="technology-apis.html">Qt and Key Technologies</a></li> 
               <li class="defaultLink"><a href="best-practices.html">How-To's and Best Practices</a></li> 
            </ul>  
          </div>
        </div>
        <div class="box" id="examples">
          <h2 title="Examples"><span></span>
            Examples</h2>
          <div id="list003" class="list">
        <ul id="ul003">
              <li class="defaultLink"><a href="all-examples.html">Examples</a></li>
              <li class="defaultLink"><a href="tutorials.html">Tutorials</a></li>
              <li class="defaultLink"><a href="demos.html">Demos</a></li>
              <li class="defaultLink"><a href="qdeclarativeexamples.html">QML Examples</a></li>
            </ul> 
          </div>
        </div>
      </div>
      <div class="wrap">
        <div class="toolbar">
          <div class="breadcrumb toolblock">
            <ul>
              <li class="first"><a href="index.html">Home</a></li>
              <!--  Breadcrumbs go here -->
<li><a href="modules.html">Modules</a></li>
<li><a href="qtcore.html">QtCore</a></li>
<li>QSettings</li>
            </ul>
          </div>
          <div class="toolbuttons toolblock">
            <ul>
              <li id="smallA" class="t_button">A</li>
              <li id="medA" class="t_button active">A</li>
              <li id="bigA" class="t_button">A</li>
              <li id="print" class="t_button"><a href="javascript:this.print();">
                <span>Print</span></a></li>
            </ul>
        </div>
        </div>
        <div class="content mainContent">
<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="#public-functions">Public Functions</a></li>
<li class="level1"><a href="#static-public-members">Static Public Members</a></li>
<li class="level1"><a href="#protected-functions">Protected Functions</a></li>
<li class="level1"><a href="#details">Detailed Description</a></li>
<li class="level2"><a href="#basic-usage">Basic Usage</a></li>
<li class="level2"><a href="#qvariant-and-gui-types">QVariant and GUI Types</a></li>
<li class="level2"><a href="#section-and-key-syntax">Section and Key Syntax</a></li>
<li class="level2"><a href="#fallback-mechanism">Fallback Mechanism</a></li>
<li class="level2"><a href="#restoring-the-state-of-a-gui-application">Restoring the State of a GUI Application</a></li>
<li class="level2"><a href="#accessing-settings-from-multiple-threads-or-processes-simultaneously">Accessing Settings from Multiple Threads or Processes Simultaneously</a></li>
<li class="level2"><a href="#platform-specific-notes">Platform-Specific Notes</a></li>
<li class="level3"><a href="#locations-where-application-settings-are-stored">Locations Where Application Settings Are Stored</a></li>
<li class="level3"><a href="#accessing-ini-and-plist-files-directly">Accessing INI and .plist Files Directly</a></li>
<li class="level3"><a href="#accessing-the-windows-registry-directly">Accessing the Windows Registry Directly</a></li>
<li class="level3"><a href="#accessing-common-registry-settings-on-windows">Accessing Common Registry Settings on Windows</a></li>
<li class="level3"><a href="#securing-application-settings-in-symbian">Securing application settings in Symbian</a></li>
<li class="level3"><a href="#changing-the-location-of-global-qt-settings-on-mac-os-x">Changing the location of global Qt settings on Mac OS X</a></li>
<li class="level3"><a href="#platform-limitations">Platform Limitations</a></li>
</ul>
</div>
<h1 class="title">QSettings Class Reference</h1>
<!-- $$$QSettings-brief -->
<p>The QSettings class provides persistent platform-independent application settings. <a href="#details">More...</a></p>
<!-- @@@QSettings -->
<pre class="cpp"> <span class="preprocessor">#include &lt;QSettings&gt;</span></pre><p><b>Inherits: </b><a href="qobject.html">QObject</a>.</p>
<p><b>Note:</b> All functions in this class are <a href="threads-reentrancy.html#reentrant">reentrant</a>, but <a href="qsettings.html#registerFormat">registerFormat</a>() is also <a href="threads-reentrancy.html#thread-safe">thread-safe</a>.</p>
<ul>
<li><a href="qsettings-members.html">List of all members, including inherited members</a></li>
<li><a href="qsettings-obsolete.html">Obsolete members</a></li>
<li><a href="qsettings-qt3.html">Qt 3 support members</a></li>
</ul>
<a name="public-types"></a>
<h2>Public Types</h2>
<table class="alignedsummary">
<tr><td class="memItemLeft rightAlign topAlign"> enum </td><td class="memItemRight bottomAlign"><b><a href="qsettings.html#Format-enum">Format</a></b> { NativeFormat, IniFormat, InvalidFormat }</td></tr>
<tr><td class="memItemLeft rightAlign topAlign"> typedef </td><td class="memItemRight bottomAlign"><b><a href="qsettings.html#ReadFunc-typedef">ReadFunc</a></b></td></tr>
<tr><td class="memItemLeft rightAlign topAlign"> enum </td><td class="memItemRight bottomAlign"><b><a href="qsettings.html#Scope-enum">Scope</a></b> { UserScope, SystemScope }</td></tr>
<tr><td class="memItemLeft rightAlign topAlign"> typedef </td><td class="memItemRight bottomAlign"><b><a href="qsettings.html#SettingsMap-typedef">SettingsMap</a></b></td></tr>
<tr><td class="memItemLeft rightAlign topAlign"> enum </td><td class="memItemRight bottomAlign"><b><a href="qsettings.html#Status-enum">Status</a></b> { NoError, AccessError, FormatError }</td></tr>
<tr><td class="memItemLeft rightAlign topAlign"> typedef </td><td class="memItemRight bottomAlign"><b><a href="qsettings.html#WriteFunc-typedef">WriteFunc</a></b></td></tr>
</table>
<a name="public-functions"></a>
<h2>Public Functions</h2>
<table class="alignedsummary">
<tr><td class="memItemLeft rightAlign topAlign"> </td><td class="memItemRight bottomAlign"><b><a href="qsettings.html#QSettings">QSettings</a></b> ( const QString &amp; <i>organization</i>, const QString &amp; <i>application</i> = QString(), QObject * <i>parent</i> = 0 )</td></tr>
<tr><td class="memItemLeft rightAlign topAlign"> </td><td class="memItemRight bottomAlign"><b><a href="qsettings.html#QSettings-2">QSettings</a></b> ( Scope <i>scope</i>, const QString &amp; <i>organization</i>, const QString &amp; <i>application</i> = QString(), QObject * <i>parent</i> = 0 )</td></tr>
<tr><td class="memItemLeft rightAlign topAlign"> </td><td class="memItemRight bottomAlign"><b><a href="qsettings.html#QSettings-3">QSettings</a></b> ( Format <i>format</i>, Scope <i>scope</i>, const QString &amp; <i>organization</i>, const QString &amp; <i>application</i> = QString(), QObject * <i>parent</i> = 0 )</td></tr>
<tr><td class="memItemLeft rightAlign topAlign"> </td><td class="memItemRight bottomAlign"><b><a href="qsettings.html#QSettings-4">QSettings</a></b> ( const QString &amp; <i>fileName</i>, Format <i>format</i>, QObject * <i>parent</i> = 0 )</td></tr>
<tr><td class="memItemLeft rightAlign topAlign"> </td><td class="memItemRight bottomAlign"><b><a href="qsettings.html#QSettings-5">QSettings</a></b> ( QObject * <i>parent</i> = 0 )</td></tr>
<tr><td class="memItemLeft rightAlign topAlign"> </td><td class="memItemRight bottomAlign"><b><a href="qsettings.html#dtor.QSettings">~QSettings</a></b> ()</td></tr>
<tr><td class="memItemLeft rightAlign topAlign"> QStringList </td><td class="memItemRight bottomAlign"><b><a href="qsettings.html#allKeys">allKeys</a></b> () const</td></tr>
<tr><td class="memItemLeft rightAlign topAlign"> QString </td><td class="memItemRight bottomAlign"><b><a href="qsettings.html#applicationName">applicationName</a></b> () const</td></tr>
<tr><td class="memItemLeft rightAlign topAlign"> void </td><td class="memItemRight bottomAlign"><b><a href="qsettings.html#beginGroup">beginGroup</a></b> ( const QString &amp; <i>prefix</i> )</td></tr>
<tr><td class="memItemLeft rightAlign topAlign"> int </td><td class="memItemRight bottomAlign"><b><a href="qsettings.html#beginReadArray">beginReadArray</a></b> ( const QString &amp; <i>prefix</i> )</td></tr>
<tr><td class="memItemLeft rightAlign topAlign"> void </td><td class="memItemRight bottomAlign"><b><a href="qsettings.html#beginWriteArray">beginWriteArray</a></b> ( const QString &amp; <i>prefix</i>, int <i>size</i> = -1 )</td></tr>
<tr><td class="memItemLeft rightAlign topAlign"> QStringList </td><td class="memItemRight bottomAlign"><b><a href="qsettings.html#childGroups">childGroups</a></b> () const</td></tr>
<tr><td class="memItemLeft rightAlign topAlign"> QStringList </td><td class="memItemRight bottomAlign"><b><a href="qsettings.html#childKeys">childKeys</a></b> () const</td></tr>
<tr><td class="memItemLeft rightAlign topAlign"> void </td><td class="memItemRight bottomAlign"><b><a href="qsettings.html#clear">clear</a></b> ()</td></tr>
<tr><td class="memItemLeft rightAlign topAlign"> bool </td><td class="memItemRight bottomAlign"><b><a href="qsettings.html#contains">contains</a></b> ( const QString &amp; <i>key</i> ) const</td></tr>
<tr><td class="memItemLeft rightAlign topAlign"> void </td><td class="memItemRight bottomAlign"><b><a href="qsettings.html#endArray">endArray</a></b> ()</td></tr>
<tr><td class="memItemLeft rightAlign topAlign"> void </td><td class="memItemRight bottomAlign"><b><a href="qsettings.html#endGroup">endGroup</a></b> ()</td></tr>
<tr><td class="memItemLeft rightAlign topAlign"> bool </td><td class="memItemRight bottomAlign"><b><a href="qsettings.html#fallbacksEnabled">fallbacksEnabled</a></b> () const</td></tr>
<tr><td class="memItemLeft rightAlign topAlign"> QString </td><td class="memItemRight bottomAlign"><b><a href="qsettings.html#fileName">fileName</a></b> () const</td></tr>
<tr><td class="memItemLeft rightAlign topAlign"> Format </td><td class="memItemRight bottomAlign"><b><a href="qsettings.html#format">format</a></b> () const</td></tr>
<tr><td class="memItemLeft rightAlign topAlign"> QString </td><td class="memItemRight bottomAlign"><b><a href="qsettings.html#group">group</a></b> () const</td></tr>
<tr><td class="memItemLeft rightAlign topAlign"> QTextCodec * </td><td class="memItemRight bottomAlign"><b><a href="qsettings.html#iniCodec">iniCodec</a></b> () const</td></tr>
<tr><td class="memItemLeft rightAlign topAlign"> bool </td><td class="memItemRight bottomAlign"><b><a href="qsettings.html#isWritable">isWritable</a></b> () const</td></tr>
<tr><td class="memItemLeft rightAlign topAlign"> QString </td><td class="memItemRight bottomAlign"><b><a href="qsettings.html#organizationName">organizationName</a></b> () const</td></tr>
<tr><td class="memItemLeft rightAlign topAlign"> void </td><td class="memItemRight bottomAlign"><b><a href="qsettings.html#remove">remove</a></b> ( const QString &amp; <i>key</i> )</td></tr>
<tr><td class="memItemLeft rightAlign topAlign"> Scope </td><td class="memItemRight bottomAlign"><b><a href="qsettings.html#scope">scope</a></b> () const</td></tr>
<tr><td class="memItemLeft rightAlign topAlign"> void </td><td class="memItemRight bottomAlign"><b><a href="qsettings.html#setArrayIndex">setArrayIndex</a></b> ( int <i>i</i> )</td></tr>
<tr><td class="memItemLeft rightAlign topAlign"> void </td><td class="memItemRight bottomAlign"><b><a href="qsettings.html#setFallbacksEnabled">setFallbacksEnabled</a></b> ( bool <i>b</i> )</td></tr>
<tr><td class="memItemLeft rightAlign topAlign"> void </td><td class="memItemRight bottomAlign"><b><a href="qsettings.html#setIniCodec">setIniCodec</a></b> ( QTextCodec * <i>codec</i> )</td></tr>
<tr><td class="memItemLeft rightAlign topAlign"> void </td><td class="memItemRight bottomAlign"><b><a href="qsettings.html#setIniCodec-2">setIniCodec</a></b> ( const char * <i>codecName</i> )</td></tr>
<tr><td class="memItemLeft rightAlign topAlign"> void </td><td class="memItemRight bottomAlign"><b><a href="qsettings.html#setValue">setValue</a></b> ( const QString &amp; <i>key</i>, const QVariant &amp; <i>value</i> )</td></tr>
<tr><td class="memItemLeft rightAlign topAlign"> Status </td><td class="memItemRight bottomAlign"><b><a href="qsettings.html#status">status</a></b> () const</td></tr>
<tr><td class="memItemLeft rightAlign topAlign"> void </td><td class="memItemRight bottomAlign"><b><a href="qsettings.html#sync">sync</a></b> ()</td></tr>
<tr><td class="memItemLeft rightAlign topAlign"> QVariant </td><td class="memItemRight bottomAlign"><b><a href="qsettings.html#value">value</a></b> ( const QString &amp; <i>key</i>, const QVariant &amp; <i>defaultValue</i> = QVariant() ) const</td></tr>
</table>
<ul>
<li class="fn">29 public functions inherited from <a href="qobject.html#public-functions">QObject</a></li>
</ul>
<a name="static-public-members"></a>
<h2>Static Public Members</h2>
<table class="alignedsummary">
<tr><td class="memItemLeft rightAlign topAlign"> Format </td><td class="memItemRight bottomAlign"><b><a href="qsettings.html#defaultFormat">defaultFormat</a></b> ()</td></tr>
<tr><td class="memItemLeft rightAlign topAlign"> Format </td><td class="memItemRight bottomAlign"><b><a href="qsettings.html#registerFormat">registerFormat</a></b> ( const QString &amp; <i>extension</i>, ReadFunc <i>readFunc</i>, WriteFunc <i>writeFunc</i>, Qt::CaseSensitivity <i>caseSensitivity</i> = Qt::CaseSensitive )</td></tr>
<tr><td class="memItemLeft rightAlign topAlign"> void </td><td class="memItemRight bottomAlign"><b><a href="qsettings.html#setDefaultFormat">setDefaultFormat</a></b> ( Format <i>format</i> )</td></tr>
<tr><td class="memItemLeft rightAlign topAlign"> void </td><td class="memItemRight bottomAlign"><b><a href="qsettings.html#setPath">setPath</a></b> ( Format <i>format</i>, Scope <i>scope</i>, const QString &amp; <i>path</i> )</td></tr>
</table>
<ul>
<li class="fn">7 static public members inherited from <a href="qobject.html#static-public-members">QObject</a></li>
</ul>
<a name="reimplemented-protected-functions"></a>
<h2>Reimplemented Protected Functions</h2>
<table class="alignedsummary">
<tr><td class="memItemLeft rightAlign topAlign"> virtual bool </td><td class="memItemRight bottomAlign"><b><a href="qsettings.html#event">event</a></b> ( QEvent * <i>event</i> )</td></tr>
</table>
<ul>
<li class="fn">8 protected functions inherited from <a href="qobject.html#protected-functions">QObject</a></li>
</ul>
<h3>Additional Inherited Members</h3>
<ul>
<li class="fn">1 property inherited from <a href="qobject.html#properties">QObject</a></li>
<li class="fn">1 public slot inherited from <a href="qobject.html#public-slots">QObject</a></li>
<li class="fn">1 signal inherited from <a href="qobject.html#signals">QObject</a></li>
<li class="fn">8 protected functions inherited from <a href="qobject.html#protected-functions">QObject</a></li>
</ul>
<a name="details"></a>
<!-- $$$QSettings-description -->
<div class="descr">
<h2>Detailed Description</h2>
<p>The QSettings class provides persistent platform-independent application settings.</p>
<p>Users normally expect an application to remember its settings (window sizes and positions, options, etc.) across sessions. This information is often stored in the system registry on Windows, and in XML preferences files on Mac OS X. On Unix systems, in the absence of a standard, many applications (including the KDE applications) use INI text files.</p>
<p>QSettings is an abstraction around these technologies, enabling you to save and restore application settings in a portable manner. It also supports <a href="qsettings.html#registerFormat">custom storage formats</a>.</p>
<p>QSettings's API is based on <a href="qvariant.html">QVariant</a>, allowing you to save most value-based types, such as <a href="qstring.html">QString</a>, <a href="qrect.html">QRect</a>, and <a href="qimage.html">QImage</a>, with the minimum of effort.</p>
<p>If all you need is a non-persistent memory-based structure, consider using <a href="qmap.html">QMap</a>&lt;<a href="qstring.html">QString</a>, <a href="qvariant.html">QVariant</a>&gt; instead.</p>
<a name="basic-usage"></a>
<h3>Basic Usage</h3>
<p>When creating a QSettings object, you must pass the name of your company or organization as well as the name of your application. For example, if your product is called Star Runner and your company is called MySoft, you would construct the QSettings object as follows:</p>
<pre class="cpp">     <span class="type">QSettings</span> settings(<span class="string">&quot;MySoft&quot;</span><span class="operator">,</span> <span class="string">&quot;Star Runner&quot;</span>);</pre>
<p>QSettings objects can be created either on the stack or on the heap (i.e&#x2e; using <tt>new</tt>). Constructing and destroying a QSettings object is very fast.</p>
<p>If you use QSettings from many places in your application, you might want to specify the organization name and the application name using <a href="qcoreapplication.html#organizationName-prop">QCoreApplication::setOrganizationName</a>() and <a href="qcoreapplication.html#applicationName-prop">QCoreApplication::setApplicationName</a>(), and then use the default QSettings constructor:</p>
<pre class="cpp">     <span class="type"><a href="qcoreapplication.html">QCoreApplication</a></span><span class="operator">::</span>setOrganizationName(<span class="string">&quot;MySoft&quot;</span>);
     <span class="type"><a href="qcoreapplication.html">QCoreApplication</a></span><span class="operator">::</span>setOrganizationDomain(<span class="string">&quot;mysoft.com&quot;</span>);
     <span class="type"><a href="qcoreapplication.html">QCoreApplication</a></span><span class="operator">::</span>setApplicationName(<span class="string">&quot;Star Runner&quot;</span>);
     ...
     <span class="type">QSettings</span> settings;</pre>
<p>(Here, we also specify the organization's Internet domain. When the Internet domain is set, it is used on Mac OS X instead of the organization name, since Mac OS X applications conventionally use Internet domains to identify themselves. If no domain is set, a fake domain is derived from the organization name. See the <a href="#platform-specific-notes">Platform-Specific Notes</a> below for details.)</p>
<p>QSettings stores settings. Each setting consists of a <a href="qstring.html">QString</a> that specifies the setting's name (the <i>key</i>) and a <a href="qvariant.html">QVariant</a> that stores the data associated with the key. To write a setting, use <a href="qsettings.html#setValue">setValue</a>(). For example:</p>
<pre class="cpp">     settings<span class="operator">.</span>setValue(<span class="string">&quot;editor/wrapMargin&quot;</span><span class="operator">,</span> <span class="number">68</span>);</pre>
<p>If there already exists a setting with the same key, the existing value is overwritten by the new value. For efficiency, the changes may not be saved to permanent storage immediately. (You can always call <a href="qsettings.html#sync">sync</a>() to commit your changes.)</p>
<p>You can get a setting's value back using <a href="qsettings.html#value">value</a>():</p>
<pre class="cpp">     <span class="type">int</span> margin <span class="operator">=</span> settings<span class="operator">.</span>value(<span class="string">&quot;editor/wrapMargin&quot;</span>)<span class="operator">.</span>toInt();</pre>
<p>If there is no setting with the specified name, QSettings returns a null <a href="qvariant.html">QVariant</a> (which can be converted to the integer 0). You can specify another default value by passing a second argument to <a href="qsettings.html#value">value</a>():</p>
<pre class="cpp">     <span class="type">int</span> margin <span class="operator">=</span> settings<span class="operator">.</span>value(<span class="string">&quot;editor/wrapMargin&quot;</span><span class="operator">,</span> <span class="number">80</span>)<span class="operator">.</span>toInt();</pre>
<p>To test whether a given key exists, call <a href="qsettings.html#contains">contains</a>(). To remove the setting associated with a key, call <a href="qsettings.html#remove">remove</a>(). To obtain the list of all keys, call <a href="qsettings.html#allKeys">allKeys</a>(). To remove all keys, call <a href="qsettings.html#clear">clear</a>().</p>
<a name="qvariant-and-gui-types"></a>
<h3>QVariant and GUI Types</h3>
<p>Because <a href="qvariant.html">QVariant</a> is part of the <a href="qtcore.html">QtCore</a> library, it cannot provide conversion functions to data types such as <a href="qcolor.html">QColor</a>, <a href="qimage.html">QImage</a>, and <a href="qpixmap.html">QPixmap</a>, which are part of <a href="qtgui.html">QtGui</a>. In other words, there is no <tt>toColor()</tt>, <tt>toImage()</tt>, or <tt>toPixmap()</tt> functions in <a href="qvariant.html">QVariant</a>.</p>
<p>Instead, you can use the <a href="qvariant.html#value">QVariant::value</a>() or the <a href="qvariant-qt3.html#qVariantValue" class="compat">qVariantValue</a>() template function. For example:</p>
<pre class="cpp"> <span class="type">QSettings</span> settings(<span class="string">&quot;MySoft&quot;</span><span class="operator">,</span> <span class="string">&quot;Star Runner&quot;</span>);
 <span class="type"><a href="qcolor.html">QColor</a></span> color <span class="operator">=</span> settings<span class="operator">.</span><a href="qsettings.html#value">value</a>(<span class="string">&quot;DataPump/bgcolor&quot;</span>)<span class="operator">.</span>value<span class="operator">&lt;</span><span class="type"><a href="qcolor.html">QColor</a></span><span class="operator">&gt;</span>();</pre>
<p>The inverse conversion (e.g&#x2e;, from <a href="qcolor.html">QColor</a> to <a href="qvariant.html">QVariant</a>) is automatic for all data types supported by <a href="qvariant.html">QVariant</a>, including GUI-related types:</p>
<pre class="cpp"> <span class="type">QSettings</span> settings(<span class="string">&quot;MySoft&quot;</span><span class="operator">,</span> <span class="string">&quot;Star Runner&quot;</span>);
 <span class="type"><a href="qcolor.html">QColor</a></span> color <span class="operator">=</span> palette()<span class="operator">.</span>background()<span class="operator">.</span>color();
 settings<span class="operator">.</span><a href="qsettings.html#setValue">setValue</a>(<span class="string">&quot;DataPump/bgcolor&quot;</span><span class="operator">,</span> color);</pre>
<p>Custom types registered using <a href="qmetatype.html#qRegisterMetaType">qRegisterMetaType</a>() and <a href="qmetatype.html#qRegisterMetaTypeStreamOperators">qRegisterMetaTypeStreamOperators</a>() can be stored using QSettings.</p>
<a name="section-and-key-syntax"></a>
<h3>Section and Key Syntax</h3>
<p>Setting keys can contain any Unicode characters. The Windows registry and INI files use case-insensitive keys, whereas the Carbon Preferences API on Mac OS X uses case-sensitive keys. To avoid portability problems, follow these simple rules:</p>
<ol class="1">
<li>Always refer to the same key using the same case. For example, if you refer to a key as &quot;text fonts&quot; in one place in your code, don't refer to it as &quot;Text Fonts&quot; somewhere else.</li>
<li>Avoid key names that are identical except for the case. For example, if you have a key called &quot;<a href="designer-to-know.html#mainwindow">MainWindow</a>&quot;, don't try to save another key as &quot;mainwindow&quot;.</li>
<li>Do not use slashes ('/' and '\') in section or key names; the backslash character is used to separate sub keys (see below). On windows '\' are converted by QSettings to '/', which makes them identical.</li>
</ol>
<p>You can form hierarchical keys using the '/' character as a separator, similar to Unix file paths. For example:</p>
<pre class="cpp">     settings<span class="operator">.</span>setValue(<span class="string">&quot;mainwindow/size&quot;</span><span class="operator">,</span> win<span class="operator">-</span><span class="operator">&gt;</span>size());
     settings<span class="operator">.</span>setValue(<span class="string">&quot;mainwindow/fullScreen&quot;</span><span class="operator">,</span> win<span class="operator">-</span><span class="operator">&gt;</span>isFullScreen());
     settings<span class="operator">.</span>setValue(<span class="string">&quot;outputpanel/visible&quot;</span><span class="operator">,</span> panel<span class="operator">-</span><span class="operator">&gt;</span>isVisible());</pre>
<p>If you want to save or restore many settings with the same prefix, you can specify the prefix using <a href="qsettings.html#beginGroup">beginGroup</a>() and call <a href="qsettings.html#endGroup">endGroup</a>() at the end. Here's the same example again, but this time using the group mechanism:</p>
<pre class="cpp">     settings<span class="operator">.</span>beginGroup(<span class="string">&quot;mainwindow&quot;</span>);
     settings<span class="operator">.</span>setValue(<span class="string">&quot;size&quot;</span><span class="operator">,</span> win<span class="operator">-</span><span class="operator">&gt;</span>size());
     settings<span class="operator">.</span>setValue(<span class="string">&quot;fullScreen&quot;</span><span class="operator">,</span> win<span class="operator">-</span><span class="operator">&gt;</span>isFullScreen());
     settings<span class="operator">.</span>endGroup();

     settings<span class="operator">.</span>beginGroup(<span class="string">&quot;outputpanel&quot;</span>);
     settings<span class="operator">.</span>setValue(<span class="string">&quot;visible&quot;</span><span class="operator">,</span> panel<span class="operator">-</span><span class="operator">&gt;</span>isVisible());
     settings<span class="operator">.</span>endGroup();</pre>
<p>If a group is set using <a href="qsettings.html#beginGroup">beginGroup</a>(), the behavior of most functions changes consequently. Groups can be set recursively.</p>
<p>In addition to groups, QSettings also supports an &quot;array&quot; concept. See <a href="qsettings.html#beginReadArray">beginReadArray</a>() and <a href="qsettings.html#beginWriteArray">beginWriteArray</a>() for details.</p>
<a name="fallback-mechanism"></a>
<h3>Fallback Mechanism</h3>
<p>Let's assume that you have created a QSettings object with the organization name MySoft and the application name Star Runner. When you look up a value, up to four locations are searched in that order:</p>
<ol class="1">
<li>a user-specific location for the Star Runner application</li>
<li>a user-specific location for all applications by MySoft</li>
<li>a system-wide location for the Star Runner application</li>
<li>a system-wide location for all applications by MySoft</li>
</ol>
<p>(See <a href="#platform-specific-notes">Platform-Specific Notes</a> below for information on what these locations are on the different platforms supported by Qt.)</p>
<p>If a key cannot be found in the first location, the search goes on in the second location, and so on. This enables you to store system-wide or organization-wide settings and to override them on a per-user or per-application basis. To turn off this mechanism, call setFallbacksEnabled(false).</p>
<p>Although keys from all four locations are available for reading, only the first file (the user-specific location for the application at hand) is accessible for writing. To write to any of the other files, omit the application name and/or specify <a href="qsettings.html#Scope-enum">QSettings::SystemScope</a> (as opposed to <a href="qsettings.html#Scope-enum">QSettings::UserScope</a>, the default).</p>
<p>Let's see with an example:</p>
<pre class="cpp">     <span class="type">QSettings</span> obj1(<span class="string">&quot;MySoft&quot;</span><span class="operator">,</span> <span class="string">&quot;Star Runner&quot;</span>);
     <span class="type">QSettings</span> obj2(<span class="string">&quot;MySoft&quot;</span>);
     <span class="type">QSettings</span> obj3(<span class="type">QSettings</span><span class="operator">::</span>SystemScope<span class="operator">,</span> <span class="string">&quot;MySoft&quot;</span><span class="operator">,</span> <span class="string">&quot;Star Runner&quot;</span>);
     <span class="type">QSettings</span> obj4(<span class="type">QSettings</span><span class="operator">::</span>SystemScope<span class="operator">,</span> <span class="string">&quot;MySoft&quot;</span>);</pre>
<p>The table below summarizes which QSettings objects access which location. &quot;<b>X</b>&quot; means that the location is the main location associated to the QSettings object and is used both for reading and for writing; &quot;o&quot; means that the location is used as a fallback when reading.</p>
<table class="generic">
<thead><tr class="qt-style"><th >Locations</th><th ><tt>obj1</tt></th><th ><tt>obj2</tt></th><th ><tt>obj3</tt></th><th ><tt>obj4</tt></th></tr></thead>
<tr valign="top" class="odd"><td >1. User, Application</td><td ><b>X</b></td><td ></td><td ></td><td ></td></tr>
<tr valign="top" class="even"><td >2. User, Organization</td><td >o</td><td ><b>X</b></td><td ></td><td ></td></tr>
<tr valign="top" class="odd"><td >3. System, Application</td><td >o</td><td ></td><td ><b>X</b></td><td ></td></tr>
<tr valign="top" class="even"><td >4. System, Organization</td><td >o</td><td >o</td><td >o</td><td ><b>X</b></td></tr>
</table>
<p>The beauty of this mechanism is that it works on all platforms supported by Qt and that it still gives you a lot of flexibility, without requiring you to specify any file names or registry paths.</p>
<p>If you want to use INI files on all platforms instead of the native API, you can pass <a href="qsettings.html#Format-enum">QSettings::IniFormat</a> as the first argument to the QSettings constructor, followed by the scope, the organization name, and the application name:</p>
<pre class="cpp">     <span class="type">QSettings</span> settings(<span class="type">QSettings</span><span class="operator">::</span>IniFormat<span class="operator">,</span> <span class="type">QSettings</span><span class="operator">::</span>UserScope<span class="operator">,</span>
                        <span class="string">&quot;MySoft&quot;</span><span class="operator">,</span> <span class="string">&quot;Star Runner&quot;</span>);</pre>
<p>The <a href="tools-settingseditor.html">Settings Editor</a> example lets you experiment with different settings location and with fallbacks turned on or off.</p>
<a name="restoring-the-state-of-a-gui-application"></a>
<h3>Restoring the State of a GUI Application</h3>
<p>QSettings is often used to store the state of a GUI application. The following example illustrates how to use QSettings to save and restore the geometry of an application's main window.</p>
<pre class="cpp"> <span class="type">void</span> MainWindow<span class="operator">::</span>writeSettings()
 {
     <span class="type">QSettings</span> settings(<span class="string">&quot;Moose Soft&quot;</span><span class="operator">,</span> <span class="string">&quot;Clipper&quot;</span>);

     settings<span class="operator">.</span>beginGroup(<span class="string">&quot;MainWindow&quot;</span>);
     settings<span class="operator">.</span>setValue(<span class="string">&quot;size&quot;</span><span class="operator">,</span> size());
     settings<span class="operator">.</span>setValue(<span class="string">&quot;pos&quot;</span><span class="operator">,</span> pos());
     settings<span class="operator">.</span>endGroup();
 }

 <span class="type">void</span> MainWindow<span class="operator">::</span>readSettings()
 {
     <span class="type">QSettings</span> settings(<span class="string">&quot;Moose Soft&quot;</span><span class="operator">,</span> <span class="string">&quot;Clipper&quot;</span>);

     settings<span class="operator">.</span>beginGroup(<span class="string">&quot;MainWindow&quot;</span>);
     resize(settings<span class="operator">.</span>value(<span class="string">&quot;size&quot;</span><span class="operator">,</span> <span class="type"><a href="qsize.html">QSize</a></span>(<span class="number">400</span><span class="operator">,</span> <span class="number">400</span>))<span class="operator">.</span>toSize());
     move(settings<span class="operator">.</span>value(<span class="string">&quot;pos&quot;</span><span class="operator">,</span> <span class="type"><a href="qpoint.html">QPoint</a></span>(<span class="number">200</span><span class="operator">,</span> <span class="number">200</span>))<span class="operator">.</span>toPoint());
     settings<span class="operator">.</span>endGroup();
 }</pre>
<p>See <a href="application-windows.html#window-geometry">Window Geometry</a> for a discussion on why it is better to call <a href="qwidget.html#size-prop">QWidget::resize</a>() and <a href="qwidget.html#pos-prop">QWidget::move</a>() rather than <a href="qwidget.html#geometry-prop">QWidget::setGeometry</a>() to restore a window's geometry.</p>
<p>The <tt>readSettings()</tt> and <tt>writeSettings()</tt> functions must be called from the main window's constructor and close event handler as follows:</p>
<pre class="cpp"> MainWindow<span class="operator">::</span>MainWindow()
 {
     ...
     readSettings();
 }

 <span class="type">void</span> MainWindow<span class="operator">::</span>closeEvent(<span class="type"><a href="qcloseevent.html">QCloseEvent</a></span> <span class="operator">*</span>event)
 {
     <span class="keyword">if</span> (userReallyWantsToQuit()) {
         writeSettings();
         event<span class="operator">-</span><span class="operator">&gt;</span>accept();
     } <span class="keyword">else</span> {
         event<span class="operator">-</span><span class="operator">&gt;</span>ignore();
     }
 }</pre>
<p>See the <a href="mainwindows-application.html">Application</a> example for a self-contained example that uses QSettings.</p>
<a name="accessing-settings-from-multiple-threads-or-processes-simultaneously"></a>
<h3>Accessing Settings from Multiple Threads or Processes Simultaneously</h3>
<p>QSettings is <a href="threads-reentrancy.html#reentrant">reentrant</a>. This means that you can use distinct QSettings object in different threads simultaneously. This guarantee stands even when the QSettings objects refer to the same files on disk (or to the same entries in the system registry). If a setting is modified through one QSettings object, the change will immediately be visible in any other QSettings objects that operate on the same location and that live in the same process.</p>
<p>QSettings can safely be used from different processes (which can be different instances of your application running at the same time or different applications altogether) to read and write to the same system locations. It uses advisory file locking and a smart merging algorithm to ensure data integrity. Note that <a href="qsettings.html#sync">sync</a>() imports changes made by other processes (in addition to writing the changes from this QSettings).</p>
<a name="platform-specific-notes"></a>
<h3>Platform-Specific Notes</h3>
<a name="locations-where-application-settings-are-stored"></a>
<h4>Locations Where Application Settings Are Stored</h4>
<p>As mentioned in the <a href="#fallback-mechanism">Fallback Mechanism</a> section, QSettings stores settings for an application in up to four locations, depending on whether the settings are user-specific or system-wide and whether the settings are application-specific or organization-wide. For simplicity, we're assuming the organization is called MySoft and the application is called Star Runner.</p>
<p>On Unix systems, if the file format is <a href="qsettings.html#Format-enum">NativeFormat</a>, the following files are used by default:</p>
<ol class="1">
<li><tt>$HOME/.config/MySoft/Star Runner.conf</tt> (Qt for Embedded Linux: <tt>$HOME/Settings/MySoft/Star Runner.conf</tt>)</li>
<li><tt>$HOME/.config/MySoft.conf</tt> (Qt for Embedded Linux: <tt>$HOME/Settings/MySoft.conf</tt>)</li>
<li><tt>/etc/xdg/MySoft/Star Runner.conf</tt></li>
<li><tt>/etc/xdg/MySoft.conf</tt></li>
</ol>
<p>On Mac OS X versions 10.2 and 10.3, these files are used by default:</p>
<ol class="1">
<li><tt>$HOME/Library/Preferences/com.MySoft.Star Runner.plist</tt></li>
<li><tt>$HOME/Library/Preferences/com.MySoft.plist</tt></li>
<li><tt>/Library/Preferences/com.MySoft.Star Runner.plist</tt></li>
<li><tt>/Library/Preferences/com.MySoft.plist</tt></li>
</ol>
<p>On Windows, <a href="qsettings.html#Format-enum">NativeFormat</a> settings are stored in the following registry paths:</p>
<ol class="1">
<li><tt>HKEY_CURRENT_USER\Software\MySoft\Star Runner</tt></li>
<li><tt>HKEY_CURRENT_USER\Software\MySoft</tt></li>
<li><tt>HKEY_LOCAL_MACHINE\Software\MySoft\Star Runner</tt></li>
<li><tt>HKEY_LOCAL_MACHINE\Software\MySoft</tt></li>
</ol>
<p><b>Note:</b> On Windows, for 32-bit programs running in WOW64 mode, settings are stored in the following registry path: <tt>HKEY_LOCAL_MACHINE\Software\WOW6432node</tt>.</p>
<p>On BlackBerry only a single file is used (see <a href="#platform-limitations">Platform Limitations</a>). If the file format is <a href="qsettings.html#Format-enum">NativeFormat</a>, this is &quot;Settings/MySoft/Star Runner.conf&quot; in the application's home directory.</p>
<p>If the file format is <a href="qsettings.html#Format-enum">IniFormat</a>, the following files are used on Unix and Mac OS X:</p>
<ol class="1">
<li><tt>$HOME/.config/MySoft/Star Runner.ini</tt> (Qt for Embedded Linux: <tt>$HOME/Settings/MySoft/Star Runner.ini</tt>)</li>
<li><tt>$HOME/.config/MySoft.ini</tt> (Qt for Embedded Linux: <tt>$HOME/Settings/MySoft.ini</tt>)</li>
<li><tt>/etc/xdg/MySoft/Star Runner.ini</tt></li>
<li><tt>/etc/xdg/MySoft.ini</tt></li>
</ol>
<p>On Windows, the following files are used:</p>
<ol class="1">
<li><tt>%APPDATA%\MySoft\Star Runner.ini</tt></li>
<li><tt>%APPDATA%\MySoft.ini</tt></li>
<li><tt>%COMMON_APPDATA%\MySoft\Star Runner.ini</tt></li>
<li><tt>%COMMON_APPDATA%\MySoft.ini</tt></li>
</ol>
<p>The <tt>%APPDATA%</tt> path is usually <tt>C:\Documents and Settings\<i>User Name</i>\Application Data</tt>; the <tt>%COMMON_APPDATA%</tt> path is usually <tt>C:\Documents and Settings\All Users\Application Data</tt>.</p>
<p>On BlackBerry only a single file is used (see <a href="#platform-limitations">Platform Limitations</a>). If the file format is <a href="qsettings.html#Format-enum">IniFormat</a>, this is &quot;Settings/MySoft/Star Runner.ini&quot; in the application's home directory.</p>
<p>On Symbian, the following files are used for both <a href="qsettings.html#Format-enum">IniFormat</a> and <a href="qsettings.html#Format-enum">NativeFormat</a> (in this example, we assume that the application is installed on the <tt>e-drive</tt> and its Secure ID is <tt>0xECB00931</tt>):</p>
<ol class="1">
<li><tt>c:\data\.config\MySoft\Star Runner.conf</tt></li>
<li><tt>c:\data\.config\MySoft.conf</tt></li>
<li><tt>e:\private\ecb00931\MySoft\Star Runner.conf</tt></li>
<li><tt>e:\private\ecb00931\MySoft.conf</tt></li>
</ol>
<p>The <a href="qsettings.html#Scope-enum">SystemScope</a> settings location is determined from the installation drive and Secure ID (UID3) of the application. If the application is built-in on the ROM, the drive used for <a href="qsettings.html#Scope-enum">SystemScope</a> is <tt>c:</tt>.</p>
<p><b>Note:</b> Symbian <a href="qsettings.html#Scope-enum">SystemScope</a> settings are by default private to the application and not shared between applications, unlike other environments.</p>
<p>The paths for the <tt>.ini</tt> and <tt>.conf</tt> files can be changed using <a href="qsettings.html#setPath">setPath</a>(). On Unix and Mac OS X, the user can override them by setting the <tt>XDG_CONFIG_HOME</tt> environment variable; see <a href="qsettings.html#setPath">setPath</a>() for details.</p>
<a name="accessing-ini-and-plist-files-directly"></a>
<h4>Accessing INI and .plist Files Directly</h4>
<p>Sometimes you do want to access settings stored in a specific file or registry path. On all platforms, if you want to read an INI file directly, you can use the QSettings constructor that takes a file name as first argument and pass <a href="qsettings.html#Format-enum">QSettings::IniFormat</a> as second argument. For example:</p>
<pre class="cpp"> <span class="type">QSettings</span> settings(<span class="string">&quot;/home/petra/misc/myapp.ini&quot;</span><span class="operator">,</span>
                    <span class="type">QSettings</span><span class="operator">::</span>IniFormat);</pre>
<p>You can then use the QSettings object to read and write settings in the file.</p>
<p>On Mac OS X, you can access XML-based <tt>.plist</tt> files by passing <a href="qsettings.html#Format-enum">QSettings::NativeFormat</a> as second argument. For example:</p>
<pre class="cpp"> <span class="type">QSettings</span> settings(<span class="string">&quot;/Users/petra/misc/myapp.plist&quot;</span><span class="operator">,</span>
                    <span class="type">QSettings</span><span class="operator">::</span>NativeFormat);</pre>
<a name="accessing-the-windows-registry-directly"></a>
<h4>Accessing the Windows Registry Directly</h4>
<p>On Windows, QSettings lets you access settings that have been written with QSettings (or settings in a supported format, e.g&#x2e;, string data) in the system registry. This is done by constructing a QSettings object with a path in the registry and <a href="qsettings.html#Format-enum">QSettings::NativeFormat</a>.</p>
<p>For example:</p>
<pre class="cpp"> <span class="type">QSettings</span> settings(<span class="string">&quot;HKEY_CURRENT_USER\\Software\\Microsoft\\Office&quot;</span><span class="operator">,</span>
                    <span class="type">QSettings</span><span class="operator">::</span>NativeFormat);</pre>
<p>All the registry entries that appear under the specified path can be read or written through the QSettings object as usual (using forward slashes instead of backslashes). For example:</p>
<pre class="cpp"> settings<span class="operator">.</span><a href="qsettings.html#setValue">setValue</a>(<span class="string">&quot;11.0/Outlook/Security/DontTrustInstalledFiles&quot;</span><span class="operator">,</span> <span class="number">0</span>);</pre>
<p>Note that the backslash character is, as mentioned, used by QSettings to separate subkeys. As a result, you cannot read or write windows registry entries that contain slashes or backslashes; you should use a native windows API if you need to do so.</p>
<a name="accessing-common-registry-settings-on-windows"></a>
<h4>Accessing Common Registry Settings on Windows</h4>
<p>On Windows, it is possible for a key to have both a value and subkeys. Its default value is accessed by using &quot;Default&quot; or &quot;.&quot; in place of a subkey:</p>
<pre class="cpp"> settings<span class="operator">.</span><a href="qsettings.html#setValue">setValue</a>(<span class="string">&quot;HKEY_CURRENT_USER\\MySoft\\Star Runner\\Galaxy&quot;</span><span class="operator">,</span> <span class="string">&quot;Milkyway&quot;</span>);
 settings<span class="operator">.</span><a href="qsettings.html#setValue">setValue</a>(<span class="string">&quot;HKEY_CURRENT_USER\\MySoft\\Star Runner\\Galaxy\\Sun&quot;</span><span class="operator">,</span> <span class="string">&quot;OurStar&quot;</span>);
 settings<span class="operator">.</span><a href="qsettings.html#value">value</a>(<span class="string">&quot;HKEY_CURRENT_USER\\MySoft\\Star Runner\\Galaxy\\Default&quot;</span>); <span class="comment">// returns &quot;Milkyway&quot;</span></pre>
<p>On other platforms than Windows, &quot;Default&quot; and &quot;.&quot; would be treated as regular subkeys.</p>
<a name="securing-application-settings-in-symbian"></a>
<h4>Securing application settings in Symbian</h4>
<p><a href="qsettings.html#Scope-enum">UserScope</a> settings in Symbian are writable by any application by default. To protect the application settings from access and tampering by other applications, the settings need to be placed in the private secure area of the application. This can be done by specifying the settings storage path directly to the private area. The following snippet changes the <a href="qsettings.html#Scope-enum">UserScope</a> to <tt>c:/private/ecb00931/MySoft.conf</tt> (provided the application is installed on the <tt>c-drive</tt> and its Secure ID is <tt>0xECB00931</tt>:</p>
<pre class="cpp"> <span class="type">QSettings</span> settings(<span class="type"><a href="qapplication.html">QApplication</a></span><span class="operator">::</span>applicationDirPath() <span class="operator">+</span> <span class="string">&quot;/MySoft.conf&quot;</span>);</pre>
<p>Framework libraries (like Qt itself) may store configuration and cache settings using <a href="qsettings.html#Scope-enum">UserScope</a>, which is accessible and writable by other applications. If the application is very security sensitive or uses high platform security capabilities, it may be prudent to also force framework settings to be stored in the private directory of the application. This can be done by changing the default path of <a href="qsettings.html#Scope-enum">UserScope</a> before <a href="qapplication.html">QApplication</a> is created:</p>
<pre class="cpp"> <span class="preprocessor">#include &lt;QSettings&gt;</span>
 <span class="preprocessor">#include &lt;QDesktopServices&gt;</span>
 <span class="type">int</span> main(<span class="type">int</span> argc<span class="operator">,</span> <span class="type">char</span> <span class="operator">*</span>argv<span class="operator">[</span><span class="operator">]</span>)
 {
 <span class="preprocessor">#ifdef Q_OS_SYMBIAN</span>
     <span class="comment">// Use QDesktopServices:storageLocation as QApplication is not yet created</span>
     <span class="type">QSettings</span><span class="operator">::</span>setPath(
         <span class="type">QSettings</span><span class="operator">::</span>NativeFormat<span class="operator">,</span> <span class="type">QSettings</span><span class="operator">::</span>UserScope<span class="operator">,</span>
         <span class="type"><a href="qdesktopservices.html">QDesktopServices</a></span><span class="operator">::</span>storageLocation(<span class="type"><a href="qdesktopservices.html">QDesktopServices</a></span><span class="operator">::</span>DataLocation) <span class="operator">+</span> <span class="string">&quot;/settings&quot;</span>);
 <span class="preprocessor">#endif</span>
     <span class="type"><a href="qapplication.html">QApplication</a></span> app(argc<span class="operator">,</span> argv);

     <span class="operator">.</span><span class="operator">.</span><span class="operator">.</span>
 }</pre>
<p>Note that this may affect framework libraries' functionality if they expect the settings to be shared between applications.</p>
<a name="changing-the-location-of-global-qt-settings-on-mac-os-x"></a>
<h4>Changing the location of global Qt settings on Mac OS X</h4>
<p>On Mac OS X, the global Qt settings (stored in <tt>com.trolltech.plist</tt>) are stored in the application settings file in two situations:</p>
<ol class="1">
<li>If the application runs in a Mac OS X sandbox (on Mac OS X 10.7 or later) or</li>
<li>If the <tt>Info.plist</tt> file of the application contains the key <tt>&quot;ForAppStore&quot;</tt> with the value <tt>&quot;yes&quot;</tt></li>
</ol>
<p>In these situations, the application settings file is named using the bundle identifier of the application, which must consequently be set in the application's <tt>Info.plist</tt> file.</p>
<p>This feature is provided to ease the acceptance of Qt applications into the Mac App Store, as the default behaviour of storing global Qt settings in the <tt>com.trolltech.plist</tt> file does not conform with Mac App Store file system usage requirements. For more information about submitting Qt applications to the Mac App Store, see <a href="mac-differences.html#preparing-a-qt-application-for-mac-app-store-submission">Preparing a Qt application for Mac App Store submission</a>.</p>
<a name="platform-limitations"></a>
<h4>Platform Limitations</h4>
<p>While QSettings attempts to smooth over the differences between the different supported platforms, there are still a few differences that you should be aware of when porting your application:</p>
<ul>
<li>The Windows system registry has the following limitations: A subkey may not exceed 255 characters, an entry's value may not exceed 16,383 characters, and all the values of a key may not exceed 65,535 characters. One way to work around these limitations is to store the settings using the <a href="qsettings.html#Format-enum">IniFormat</a> instead of the <a href="qsettings.html#Format-enum">NativeFormat</a>.</li>
<li>On Mac OS X, <a href="qsettings.html#allKeys">allKeys</a>() will return some extra keys for global settings that apply to all applications. These keys can be read using <a href="qsettings.html#value">value</a>() but cannot be changed, only shadowed. Calling setFallbacksEnabled(false) will hide these global settings.</li>
<li>On Mac OS X, the CFPreferences API used by QSettings expects Internet domain names rather than organization names. To provide a uniform API, QSettings derives a fake domain name from the organization name (unless the organization name already is a domain name, e.g&#x2e; OpenOffice.org). The algorithm appends &quot;.com&quot; to the company name and replaces spaces and other illegal characters with hyphens. If you want to specify a different domain name, call <a href="qcoreapplication.html#organizationDomain-prop">QCoreApplication::setOrganizationDomain</a>(), <a href="qcoreapplication.html#organizationName-prop">QCoreApplication::setOrganizationName</a>(), and <a href="qcoreapplication.html#applicationName-prop">QCoreApplication::setApplicationName</a>() in your <tt>main()</tt> function and then use the default QSettings constructor. Another solution is to use preprocessor directives, for example:<pre class="cpp"> <span class="preprocessor">#ifdef Q_WS_MAC</span>
     <span class="type">QSettings</span> settings(<span class="string">&quot;grenoullelogique.fr&quot;</span><span class="operator">,</span> <span class="string">&quot;Squash&quot;</span>);
 <span class="preprocessor">#else</span>
     <span class="type">QSettings</span> settings(<span class="string">&quot;Grenoulle Logique&quot;</span><span class="operator">,</span> <span class="string">&quot;Squash&quot;</span>);
 <span class="preprocessor">#endif</span></pre>
</li>
<li>On Unix and Mac OS X systems, the advisory file locking is disabled if NFS (or AutoFS or CacheFS) is detected to work around a bug in the NFS fcntl() implementation, which hangs forever if statd or lockd aren't running. Also, the locking isn't performed when accessing <tt>.plist</tt> files.</li>
<li>On the BlackBerry platform, applications run in a sandbox. They are not allowed to read or write outside of this sandbox. This involves the following limitations:<ul>
<li>As there is only a single scope the scope is simply ignored, i.e&#x2e; there is no difference between <a href="qsettings.html#Scope-enum">SystemScope</a> and <a href="qsettings.html#Scope-enum">UserScope</a>.</li>
<li>The <a href="#fallback-mechanism">Fallback Mechanism</a> is not applied, i.e&#x2e; only a single location is considered.</li>
<li>It is advised against setting and using custom file paths.</li>
</ul>
</li>
</ul>
</div>
<p><b>See also </b><a href="qvariant.html">QVariant</a>, <a href="qsessionmanager.html">QSessionManager</a>, <a href="tools-settingseditor.html">Settings Editor Example</a>, and <a href="mainwindows-application.html">Application Example</a>.</p>
<!-- @@@QSettings -->
<div class="types">
<h2>Member Type Documentation</h2>
<!-- $$$Format$$$NativeFormat$$$IniFormat$$$InvalidFormat$$$CustomFormat1$$$CustomFormat2$$$CustomFormat3$$$CustomFormat4$$$CustomFormat5$$$CustomFormat6$$$CustomFormat7$$$CustomFormat8$$$CustomFormat9$$$CustomFormat10$$$CustomFormat11$$$CustomFormat12$$$CustomFormat13$$$CustomFormat14$$$CustomFormat15$$$CustomFormat16 -->
<h3 class="fn"><a name="Format-enum"></a>enum QSettings::<span class="name">Format</span></h3>
<p>This enum type specifies the storage format used by <a href="qsettings.html">QSettings</a>.</p>
<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"><tt>QSettings::NativeFormat</tt></td><td class="topAlign"><tt>0</tt></td><td class="topAlign">Store the settings using the most appropriate storage format for the platform. On Windows, this means the system registry; on Mac OS X, this means the CFPreferences API; on Unix, this means textual configuration files in INI format.</td></tr>
<tr><td class="topAlign"><tt>QSettings::IniFormat</tt></td><td class="topAlign"><tt>1</tt></td><td class="topAlign">Store the settings in INI files.</td></tr>
<tr><td class="topAlign"><tt>QSettings::InvalidFormat</tt></td><td class="topAlign"><tt>16</tt></td><td class="topAlign">Special value returned by <a href="qsettings.html#registerFormat">registerFormat</a>().</td></tr>
</table>
<p>On Unix, NativeFormat and IniFormat mean the same thing, except that the file extension is different (<tt>.conf</tt> for NativeFormat, <tt>.ini</tt> for IniFormat).</p>
<p>The INI file format is a Windows file format that Qt supports on all platforms. In the absence of an INI standard, we try to follow what Microsoft does, with the following exceptions:</p>
<ul>
<li>If you store types that <a href="qvariant.html">QVariant</a> can't convert to <a href="qstring.html">QString</a> (e.g&#x2e;, <a href="qpoint.html">QPoint</a>, <a href="qrect.html">QRect</a>, and <a href="qsize.html">QSize</a>), Qt uses an <tt>@</tt>-based syntax to encode the type. For example:<pre class="cpp"> pos <span class="operator">=</span> @Point(<span class="number">100</span> <span class="number">100</span>)</pre>
<p>To minimize compatibility issues, any <tt>@</tt> that doesn't appear at the first position in the value or that isn't followed by a Qt type (<tt>Point</tt>, <tt>Rect</tt>, <tt>Size</tt>, etc.) is treated as a normal character.</p>
</li>
<li>Although backslash is a special character in INI files, most Windows applications don't escape backslashes (<tt>\</tt>) in file paths:<pre class="cpp"> windir <span class="operator">=</span> C:\Windows</pre>
<p><a href="qsettings.html">QSettings</a> always treats backslash as a special character and provides no API for reading or writing such entries.</p>
</li>
<li>The INI file format has severe restrictions on the syntax of a key. Qt works around this by using <tt>%</tt> as an escape character in keys. In addition, if you save a top-level setting (a key with no slashes in it, e.g&#x2e;, &quot;someKey&quot;), it will appear in the INI file's &quot;General&quot; section. To avoid overwriting other keys, if you save something using the a key such as &quot;General/someKey&quot;, the key will be located in the &quot;%General&quot; section, <i>not</i> in the &quot;General&quot; section.</li>
<li>Following the philosophy that we should be liberal in what we accept and conservative in what we generate, <a href="qsettings.html">QSettings</a> will accept Latin-1 encoded INI files, but generate pure ASCII files, where non-ASCII values are encoded using standard INI escape sequences. To make the INI files more readable (but potentially less compatible), call <a href="qsettings.html#setIniCodec">setIniCodec</a>().</li>
</ul>
<p><b>See also </b><a href="qsettings.html#registerFormat">registerFormat</a>() and <a href="qsettings.html#setPath">setPath</a>().</p>
<!-- @@@Format -->
<!-- $$$ReadFunc -->
<h3 class="fn"><a name="ReadFunc-typedef"></a>typedef QSettings::<span class="name">ReadFunc</span></h3>
<p>Typedef for a pointer to a function with the following signature:</p>
<pre class="cpp"> <span class="type">bool</span> myReadFunc(<span class="type"><a href="qiodevice.html">QIODevice</a></span> <span class="operator">&amp;</span>device<span class="operator">,</span> <span class="type"><a href="qsettings.html">QSettings</a></span><span class="operator">::</span>SettingsMap <span class="operator">&amp;</span>map);</pre>
<p><tt>ReadFunc</tt> is used in <tt>registerFormat()</tt> as a pointer to a function that reads a set of key/value pairs. <tt>ReadFunc</tt> should read all the options in one pass, and return all the settings in the <tt>SettingsMap</tt> container, which is initially empty.</p>
<p><b>See also </b><a href="qsettings.html#WriteFunc-typedef">WriteFunc</a> and <a href="qsettings.html#registerFormat">registerFormat</a>().</p>
<!-- @@@ReadFunc -->
<!-- $$$Scope$$$UserScope$$$SystemScope$$$User$$$Global -->
<h3 class="fn"><a name="Scope-enum"></a>enum QSettings::<span class="name">Scope</span></h3>
<p>This enum specifies whether settings are user-specific or shared by all users of the same system.</p>
<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"><tt>QSettings::UserScope</tt></td><td class="topAlign"><tt>0</tt></td><td class="topAlign">Store settings in a location specific to the current user (e.g&#x2e;, in the user's home directory).</td></tr>
<tr><td class="topAlign"><tt>QSettings::SystemScope</tt></td><td class="topAlign"><tt>1</tt></td><td class="topAlign">Store settings in a global location, so that all users on the same machine access the same set of settings.</td></tr>
</table>
<p><b>See also </b><a href="qsettings.html#setPath">setPath</a>().</p>
<!-- @@@Scope -->
<!-- $$$SettingsMap -->
<h3 class="fn"><a name="SettingsMap-typedef"></a>typedef QSettings::<span class="name">SettingsMap</span></h3>
<p>Typedef for <a href="qmap.html">QMap</a>&lt;<a href="qstring.html">QString</a>, <a href="qvariant.html">QVariant</a>&gt;.</p>
<p><b>See also </b><a href="qsettings.html#registerFormat">registerFormat</a>().</p>
<!-- @@@SettingsMap -->
<!-- $$$Status$$$NoError$$$AccessError$$$FormatError -->
<h3 class="fn"><a name="Status-enum"></a>enum QSettings::<span class="name">Status</span></h3>
<p>The following status values are possible:</p>
<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"><tt>QSettings::NoError</tt></td><td class="topAlign"><tt>0</tt></td><td class="topAlign">No error occurred.</td></tr>
<tr><td class="topAlign"><tt>QSettings::AccessError</tt></td><td class="topAlign"><tt>1</tt></td><td class="topAlign">An access error occurred (e.g&#x2e; trying to write to a read-only file).</td></tr>
<tr><td class="topAlign"><tt>QSettings::FormatError</tt></td><td class="topAlign"><tt>2</tt></td><td class="topAlign">A format error occurred (e.g&#x2e; loading a malformed INI file).</td></tr>
</table>
<p><b>See also </b><a href="qsettings.html#status">status</a>().</p>
<!-- @@@Status -->
<!-- $$$WriteFunc -->
<h3 class="fn"><a name="WriteFunc-typedef"></a>typedef QSettings::<span class="name">WriteFunc</span></h3>
<p>Typedef for a pointer to a function with the following signature:</p>
<pre class="cpp"> <span class="type">bool</span> myWriteFunc(<span class="type"><a href="qiodevice.html">QIODevice</a></span> <span class="operator">&amp;</span>device<span class="operator">,</span> <span class="keyword">const</span> <span class="type"><a href="qsettings.html">QSettings</a></span><span class="operator">::</span>SettingsMap <span class="operator">&amp;</span>map);</pre>
<p><tt>WriteFunc</tt> is used in <tt>registerFormat()</tt> as a pointer to a function that writes a set of key/value pairs. <tt>WriteFunc</tt> is only called once, so you need to output the settings in one go.</p>
<p><b>See also </b><a href="qsettings.html#ReadFunc-typedef">ReadFunc</a> and <a href="qsettings.html#registerFormat">registerFormat</a>().</p>
<!-- @@@WriteFunc -->
</div>
<div class="func">
<h2>Member Function Documentation</h2>
<!-- $$$QSettings[overload1]$$$QSettingsconstQString&constQString&QObject* -->
<h3 class="fn"><a name="QSettings"></a>QSettings::<span class="name">QSettings</span> ( const <span class="type"><a href="qstring.html">QString</a></span> &amp; <i>organization</i>, const <span class="type"><a href="qstring.html">QString</a></span> &amp; <i>application</i> = QString(), <span class="type"><a href="qobject.html">QObject</a></span> * <i>parent</i> = 0 )</h3>
<p>Constructs a <a href="qsettings.html">QSettings</a> object for accessing settings of the application called <i>application</i> from the organization called <i>organization</i>, and with parent <i>parent</i>.</p>
<p>Example:</p>
<pre class="cpp"> <span class="type"><a href="qsettings.html">QSettings</a></span> settings(<span class="string">&quot;Moose Tech&quot;</span><span class="operator">,</span> <span class="string">&quot;Facturo-Pro&quot;</span>);</pre>
<p>The scope is set to <a href="qsettings.html#Scope-enum">QSettings::UserScope</a>, and the format is set to <a href="qsettings.html#Format-enum">QSettings::NativeFormat</a> (i.e&#x2e; calling <a href="qsettings.html#setDefaultFormat">setDefaultFormat</a>() before calling this constructor has no effect).</p>
<p><b>See also </b><a href="qsettings.html#setDefaultFormat">setDefaultFormat</a>() and <a href="qsettings.html#fallback-mechanism">Fallback Mechanism</a>.</p>
<!-- @@@QSettings -->
<!-- $$$QSettings$$$QSettingsScopeconstQString&constQString&QObject* -->
<h3 class="fn"><a name="QSettings-2"></a>QSettings::<span class="name">QSettings</span> ( <span class="type"><a href="qsettings.html#Scope-enum">Scope</a></span> <i>scope</i>, const <span class="type"><a href="qstring.html">QString</a></span> &amp; <i>organization</i>, const <span class="type"><a href="qstring.html">QString</a></span> &amp; <i>application</i> = QString(), <span class="type"><a href="qobject.html">QObject</a></span> * <i>parent</i> = 0 )</h3>
<p>Constructs a <a href="qsettings.html">QSettings</a> object for accessing settings of the application called <i>application</i> from the organization called <i>organization</i>, and with parent <i>parent</i>.</p>
<p>If <i>scope</i> is <a href="qsettings.html#Scope-enum">QSettings::UserScope</a>, the <a href="qsettings.html">QSettings</a> object searches user-specific settings first, before it searches system-wide settings as a fallback. If <i>scope</i> is <a href="qsettings.html#Scope-enum">QSettings::SystemScope</a>, the <a href="qsettings.html">QSettings</a> object ignores user-specific settings and provides access to system-wide settings.</p>
<p>The storage format is set to <a href="qsettings.html#Format-enum">QSettings::NativeFormat</a> (i.e&#x2e; calling <a href="qsettings.html#setDefaultFormat">setDefaultFormat</a>() before calling this constructor has no effect).</p>
<p>If no application name is given, the <a href="qsettings.html">QSettings</a> object will only access the organization-wide <a href="qsettings.html#fallback-mechanism">locations</a>.</p>
<p><b>See also </b><a href="qsettings.html#setDefaultFormat">setDefaultFormat</a>().</p>
<!-- @@@QSettings -->
<!-- $$$QSettings$$$QSettingsFormatScopeconstQString&constQString&QObject* -->
<h3 class="fn"><a name="QSettings-3"></a>QSettings::<span class="name">QSettings</span> ( <span class="type"><a href="qsettings.html#Format-enum">Format</a></span> <i>format</i>, <span class="type"><a href="qsettings.html#Scope-enum">Scope</a></span> <i>scope</i>, const <span class="type"><a href="qstring.html">QString</a></span> &amp; <i>organization</i>, const <span class="type"><a href="qstring.html">QString</a></span> &amp; <i>application</i> = QString(), <span class="type"><a href="qobject.html">QObject</a></span> * <i>parent</i> = 0 )</h3>
<p>Constructs a <a href="qsettings.html">QSettings</a> object for accessing settings of the application called <i>application</i> from the organization called <i>organization</i>, and with parent <i>parent</i>.</p>
<p>If <i>scope</i> is <a href="qsettings.html#Scope-enum">QSettings::UserScope</a>, the <a href="qsettings.html">QSettings</a> object searches user-specific settings first, before it searches system-wide settings as a fallback. If <i>scope</i> is <a href="qsettings.html#Scope-enum">QSettings::SystemScope</a>, the <a href="qsettings.html">QSettings</a> object ignores user-specific settings and provides access to system-wide settings.</p>
<p>If <i>format</i> is <a href="qsettings.html#Format-enum">QSettings::NativeFormat</a>, the native API is used for storing settings. If <i>format</i> is <a href="qsettings.html#Format-enum">QSettings::IniFormat</a>, the INI format is used.</p>
<p>If no application name is given, the <a href="qsettings.html">QSettings</a> object will only access the organization-wide <a href="qsettings.html#fallback-mechanism">locations</a>.</p>
<!-- @@@QSettings -->
<!-- $$$QSettings$$$QSettingsconstQString&FormatQObject* -->
<h3 class="fn"><a name="QSettings-4"></a>QSettings::<span class="name">QSettings</span> ( const <span class="type"><a href="qstring.html">QString</a></span> &amp; <i>fileName</i>, <span class="type"><a href="qsettings.html#Format-enum">Format</a></span> <i>format</i>, <span class="type"><a href="qobject.html">QObject</a></span> * <i>parent</i> = 0 )</h3>
<p>Constructs a <a href="qsettings.html">QSettings</a> object for accessing the settings stored in the file called <i>fileName</i>, with parent <i>parent</i>. If the file doesn't already exist, it is created.</p>
<p>If <i>format</i> is <a href="qsettings.html#Format-enum">QSettings::NativeFormat</a>, the meaning of <i>fileName</i> depends on the platform. On Unix, <i>fileName</i> is the name of an INI file. On Mac OS X, <i>fileName</i> is the name of a <tt>.plist</tt> file. On Windows, <i>fileName</i> is a path in the system registry.</p>
<p>If <i>format</i> is <a href="qsettings.html#Format-enum">QSettings::IniFormat</a>, <i>fileName</i> is the name of an INI file.</p>
<p><b>Warning:</b> This function is provided for convenience. It works well for accessing INI or <tt>.plist</tt> files generated by Qt, but might fail on some syntaxes found in such files originated by other programs. In particular, be aware of the following limitations:</p>
<ul>
<li><a href="qsettings.html">QSettings</a> provides no way of reading INI &quot;path&quot; entries, i.e&#x2e;, entries with unescaped slash characters. (This is because these entries are ambiguous and cannot be resolved automatically.)</li>
<li>In INI files, <a href="qsettings.html">QSettings</a> uses the <tt>@</tt> character as a metacharacter in some contexts, to encode Qt-specific data types (e.g&#x2e;, <tt>@Rect</tt>), and might therefore misinterpret it when it occurs in pure INI files.</li>
</ul>
<p><b>See also </b><a href="qsettings.html#fileName">fileName</a>().</p>
<!-- @@@QSettings -->
<!-- $$$QSettings$$$QSettingsQObject* -->
<h3 class="fn"><a name="QSettings-5"></a>QSettings::<span class="name">QSettings</span> ( <span class="type"><a href="qobject.html">QObject</a></span> * <i>parent</i> = 0 )</h3>
<p>Constructs a <a href="qsettings.html">QSettings</a> object for accessing settings of the application and organization set previously with a call to <a href="qcoreapplication.html#organizationName-prop">QCoreApplication::setOrganizationName</a>(), <a href="qcoreapplication.html#organizationDomain-prop">QCoreApplication::setOrganizationDomain</a>(), and <a href="qcoreapplication.html#applicationName-prop">QCoreApplication::setApplicationName</a>().</p>
<p>The scope is <a href="qsettings.html#Scope-enum">QSettings::UserScope</a> and the format is <a href="qsettings.html#defaultFormat">defaultFormat</a>() (<a href="qsettings.html#Format-enum">QSettings::NativeFormat</a> by default). Use <a href="qsettings.html#setDefaultFormat">setDefaultFormat</a>() before calling this constructor to change the default format used by this constructor.</p>
<p>The code</p>
<pre class="cpp"> <span class="type"><a href="qsettings.html">QSettings</a></span> settings(<span class="string">&quot;Moose Soft&quot;</span><span class="operator">,</span> <span class="string">&quot;Facturo-Pro&quot;</span>);</pre>
<p>is equivalent to</p>
<pre class="cpp"> <span class="type"><a href="qcoreapplication.html">QCoreApplication</a></span><span class="operator">::</span>setOrganizationName(<span class="string">&quot;Moose Soft&quot;</span>);
 <span class="type"><a href="qcoreapplication.html">QCoreApplication</a></span><span class="operator">::</span>setApplicationName(<span class="string">&quot;Facturo-Pro&quot;</span>);
 <span class="type"><a href="qsettings.html">QSettings</a></span> settings;</pre>
<p>If <a href="qcoreapplication.html#organizationName-prop">QCoreApplication::setOrganizationName</a>() and <a href="qcoreapplication.html#applicationName-prop">QCoreApplication::setApplicationName</a>() has not been previously called, the <a href="qsettings.html">QSettings</a> object will not be able to read or write any settings, and <a href="qsettings.html#status">status</a>() will return <a href="qsettings.html#Status-enum">AccessError</a>.</p>
<p>On Mac OS X, if both a name and an Internet domain are specified for the organization, the domain is preferred over the name. On other platforms, the name is preferred over the domain.</p>
<p><b>See also </b><a href="qcoreapplication.html#organizationName-prop">QCoreApplication::setOrganizationName</a>(), <a href="qcoreapplication.html#organizationDomain-prop">QCoreApplication::setOrganizationDomain</a>(), <a href="qcoreapplication.html#applicationName-prop">QCoreApplication::setApplicationName</a>(), and <a href="qsettings.html#setDefaultFormat">setDefaultFormat</a>().</p>
<!-- @@@QSettings -->
<!-- $$$~QSettings[overload1]$$$~QSettings -->
<h3 class="fn"><a name="dtor.QSettings"></a>QSettings::<span class="name">~QSettings</span> ()</h3>
<p>Destroys the <a href="qsettings.html">QSettings</a> object.</p>
<p>Any unsaved changes will eventually be written to permanent storage.</p>
<p><b>See also </b><a href="qsettings.html#sync">sync</a>().</p>
<!-- @@@~QSettings -->
<!-- $$$allKeys[overload1]$$$allKeys -->
<h3 class="fn"><a name="allKeys"></a><span class="type"><a href="qstringlist.html">QStringList</a></span> QSettings::<span class="name">allKeys</span> () const</h3>
<p>Returns a list of all keys, including subkeys, that can be read using the <a href="qsettings.html">QSettings</a> object.</p>
<p>Example:</p>
<pre class="cpp"> <span class="type"><a href="qsettings.html">QSettings</a></span> settings;
 settings<span class="operator">.</span><a href="qsettings.html#setValue">setValue</a>(<span class="string">&quot;fridge/color&quot;</span><span class="operator">,</span> <span class="type"><a href="qt.html">Qt</a></span><span class="operator">::</span>white);
 settings<span class="operator">.</span><a href="qsettings.html#setValue">setValue</a>(<span class="string">&quot;fridge/size&quot;</span><span class="operator">,</span> <span class="type"><a href="qsize.html">QSize</a></span>(<span class="number">32</span><span class="operator">,</span> <span class="number">96</span>));
 settings<span class="operator">.</span><a href="qsettings.html#setValue">setValue</a>(<span class="string">&quot;sofa&quot;</span><span class="operator">,</span> <span class="keyword">true</span>);
 settings<span class="operator">.</span><a href="qsettings.html#setValue">setValue</a>(<span class="string">&quot;tv&quot;</span><span class="operator">,</span> <span class="keyword">false</span>);

 <span class="type"><a href="qstringlist.html">QStringList</a></span> keys <span class="operator">=</span> settings<span class="operator">.</span>allKeys();
 <span class="comment">// keys: [&quot;fridge/color&quot;, &quot;fridge/size&quot;, &quot;sofa&quot;, &quot;tv&quot;]</span></pre>
<p>If a group is set using <a href="qsettings.html#beginGroup">beginGroup</a>(), only the keys in the group are returned, without the group prefix:</p>
<pre class="cpp"> settings<span class="operator">.</span><a href="qsettings.html#beginGroup">beginGroup</a>(<span class="string">&quot;fridge&quot;</span>);
 keys <span class="operator">=</span> settings<span class="operator">.</span>allKeys();
 <span class="comment">// keys: [&quot;color&quot;, &quot;size&quot;]</span></pre>
<p><b>See also </b><a href="qsettings.html#childGroups">childGroups</a>() and <a href="qsettings.html#childKeys">childKeys</a>().</p>
<!-- @@@allKeys -->
<!-- $$$applicationName[overload1]$$$applicationName -->
<h3 class="fn"><a name="applicationName"></a><span class="type"><a href="qstring.html">QString</a></span> QSettings::<span class="name">applicationName</span> () const</h3>
<p>Returns the application name used for storing the settings.</p>
<p>This function was introduced in Qt 4.4.</p>
<p><b>See also </b><a href="qcoreapplication.html#applicationName-prop">QCoreApplication::applicationName</a>(), <a href="qsettings.html#format">format</a>(), <a href="qsettings.html#scope">scope</a>(), and <a href="qsettings.html#organizationName">organizationName</a>().</p>
<!-- @@@applicationName -->
<!-- $$$beginGroup[overload1]$$$beginGroupconstQString& -->
<h3 class="fn"><a name="beginGroup"></a><span class="type">void</span> QSettings::<span class="name">beginGroup</span> ( const <span class="type"><a href="qstring.html">QString</a></span> &amp; <i>prefix</i> )</h3>
<p>Appends <i>prefix</i> to the current group.</p>
<p>The current group is automatically prepended to all keys specified to <a href="qsettings.html">QSettings</a>. In addition, query functions such as <a href="qsettings.html#childGroups">childGroups</a>(), <a href="qsettings.html#childKeys">childKeys</a>(), and <a href="qsettings.html#allKeys">allKeys</a>() are based on the group. By default, no group is set.</p>
<p>Groups are useful to avoid typing in the same setting paths over and over. For example:</p>
<pre class="cpp"> settings<span class="operator">.</span>beginGroup(<span class="string">&quot;mainwindow&quot;</span>);
 settings<span class="operator">.</span><a href="qsettings.html#setValue">setValue</a>(<span class="string">&quot;size&quot;</span><span class="operator">,</span> win<span class="operator">-</span><span class="operator">&gt;</span>size());
 settings<span class="operator">.</span><a href="qsettings.html#setValue">setValue</a>(<span class="string">&quot;fullScreen&quot;</span><span class="operator">,</span> win<span class="operator">-</span><span class="operator">&gt;</span>isFullScreen());
 settings<span class="operator">.</span><a href="qsettings.html#endGroup">endGroup</a>();

 settings<span class="operator">.</span>beginGroup(<span class="string">&quot;outputpanel&quot;</span>);
 settings<span class="operator">.</span><a href="qsettings.html#setValue">setValue</a>(<span class="string">&quot;visible&quot;</span><span class="operator">,</span> panel<span class="operator">-</span><span class="operator">&gt;</span>isVisible());
 settings<span class="operator">.</span><a href="qsettings.html#endGroup">endGroup</a>();</pre>
<p>This will set the value of three settings:</p>
<ul>
<li><tt>mainwindow/size</tt></li>
<li><tt>mainwindow/fullScreen</tt></li>
<li><tt>outputpanel/visible</tt></li>
</ul>
<p>Call <a href="qsettings.html#endGroup">endGroup</a>() to reset the current group to what it was before the corresponding beginGroup() call. Groups can be nested.</p>
<p><b>See also </b><a href="qsettings.html#endGroup">endGroup</a>() and <a href="qsettings.html#group">group</a>().</p>
<!-- @@@beginGroup -->
<!-- $$$beginReadArray[overload1]$$$beginReadArrayconstQString& -->
<h3 class="fn"><a name="beginReadArray"></a><span class="type">int</span> QSettings::<span class="name">beginReadArray</span> ( const <span class="type"><a href="qstring.html">QString</a></span> &amp; <i>prefix</i> )</h3>
<p>Adds <i>prefix</i> to the current group and starts reading from an array. Returns the size of the array.</p>
<p>Example:</p>
<pre class="cpp"> <span class="keyword">struct</span> Login {
     <span class="type"><a href="qstring.html">QString</a></span> userName;
     <span class="type"><a href="qstring.html">QString</a></span> password;
 };
 <span class="type"><a href="qlist.html">QList</a></span><span class="operator">&lt;</span>Login<span class="operator">&gt;</span> logins;
 <span class="operator">.</span><span class="operator">.</span><span class="operator">.</span>

 <span class="type"><a href="qsettings.html">QSettings</a></span> settings;
 <span class="type">int</span> size <span class="operator">=</span> settings<span class="operator">.</span>beginReadArray(<span class="string">&quot;logins&quot;</span>);
 <span class="keyword">for</span> (<span class="type">int</span> i <span class="operator">=</span> <span class="number">0</span>; i <span class="operator">&lt;</span> size; <span class="operator">+</span><span class="operator">+</span>i) {
     settings<span class="operator">.</span>setArrayIndex(i);
     Login login;
     login<span class="operator">.</span>userName <span class="operator">=</span> settings<span class="operator">.</span>value(<span class="string">&quot;userName&quot;</span>)<span class="operator">.</span>toString();
     login<span class="operator">.</span>password <span class="operator">=</span> settings<span class="operator">.</span>value(<span class="string">&quot;password&quot;</span>)<span class="operator">.</span>toString();
     logins<span class="operator">.</span>append(login);
 }
 settings<span class="operator">.</span><a href="qsettings.html#endArray">endArray</a>();</pre>
<p>Use <a href="qsettings.html#beginWriteArray">beginWriteArray</a>() to write the array in the first place.</p>
<p><b>See also </b><a href="qsettings.html#beginWriteArray">beginWriteArray</a>(), <a href="qsettings.html#endArray">endArray</a>(), and <a href="qsettings.html#setArrayIndex">setArrayIndex</a>().</p>
<!-- @@@beginReadArray -->
<!-- $$$beginWriteArray[overload1]$$$beginWriteArrayconstQString&int -->
<h3 class="fn"><a name="beginWriteArray"></a><span class="type">void</span> QSettings::<span class="name">beginWriteArray</span> ( const <span class="type"><a href="qstring.html">QString</a></span> &amp; <i>prefix</i>, <span class="type">int</span> <i>size</i> = -1 )</h3>
<p>Adds <i>prefix</i> to the current group and starts writing an array of size <i>size</i>. If <i>size</i> is -1 (the default), it is automatically determined based on the indexes of the entries written.</p>
<p>If you have many occurrences of a certain set of keys, you can use arrays to make your life easier. For example, let's suppose that you want to save a variable-length list of user names and passwords. You could then write:</p>
<pre class="cpp"> <span class="keyword">struct</span> Login {
     <span class="type"><a href="qstring.html">QString</a></span> userName;
     <span class="type"><a href="qstring.html">QString</a></span> password;
 };
 <span class="type"><a href="qlist.html">QList</a></span><span class="operator">&lt;</span>Login<span class="operator">&gt;</span> logins;
 <span class="operator">.</span><span class="operator">.</span><span class="operator">.</span>

 <span class="type"><a href="qsettings.html">QSettings</a></span> settings;
 settings<span class="operator">.</span>beginWriteArray(<span class="string">&quot;logins&quot;</span>);
 <span class="keyword">for</span> (<span class="type">int</span> i <span class="operator">=</span> <span class="number">0</span>; i <span class="operator">&lt;</span> logins<span class="operator">.</span>size(); <span class="operator">+</span><span class="operator">+</span>i) {
     settings<span class="operator">.</span>setArrayIndex(i);
     settings<span class="operator">.</span>setValue(<span class="string">&quot;userName&quot;</span><span class="operator">,</span> list<span class="operator">.</span>at(i)<span class="operator">.</span>userName);
     settings<span class="operator">.</span>setValue(<span class="string">&quot;password&quot;</span><span class="operator">,</span> list<span class="operator">.</span>at(i)<span class="operator">.</span>password);
 }
 settings<span class="operator">.</span><a href="qsettings.html#endArray">endArray</a>();</pre>
<p>The generated keys will have the form</p>
<ul>
<li><tt>logins/size</tt></li>
<li><tt>logins/1/userName</tt></li>
<li><tt>logins/1/password</tt></li>
<li><tt>logins/2/userName</tt></li>
<li><tt>logins/2/password</tt></li>
<li><tt>logins/3/userName</tt></li>
<li><tt>logins/3/password</tt></li>
<li>...</li>
</ul>
<p>To read back an array, use <a href="qsettings.html#beginReadArray">beginReadArray</a>().</p>
<p><b>See also </b><a href="qsettings.html#beginReadArray">beginReadArray</a>(), <a href="qsettings.html#endArray">endArray</a>(), and <a href="qsettings.html#setArrayIndex">setArrayIndex</a>().</p>
<!-- @@@beginWriteArray -->
<!-- $$$childGroups[overload1]$$$childGroups -->
<h3 class="fn"><a name="childGroups"></a><span class="type"><a href="qstringlist.html">QStringList</a></span> QSettings::<span class="name">childGroups</span> () const</h3>
<p>Returns a list of all key top-level groups that contain keys that can be read using the <a href="qsettings.html">QSettings</a> object.</p>
<p>Example:</p>
<pre class="cpp"> <span class="type"><a href="qsettings.html">QSettings</a></span> settings;
 settings<span class="operator">.</span><a href="qsettings.html#setValue">setValue</a>(<span class="string">&quot;fridge/color&quot;</span><span class="operator">,</span> <span class="type"><a href="qt.html">Qt</a></span><span class="operator">::</span>white);
 settings<span class="operator">.</span><a href="qsettings.html#setValue">setValue</a>(<span class="string">&quot;fridge/size&quot;</span><span class="operator">,</span> <span class="type"><a href="qsize.html">QSize</a></span>(<span class="number">32</span><span class="operator">,</span> <span class="number">96</span>));
 settings<span class="operator">.</span><a href="qsettings.html#setValue">setValue</a>(<span class="string">&quot;sofa&quot;</span><span class="operator">,</span> <span class="keyword">true</span>);
 settings<span class="operator">.</span><a href="qsettings.html#setValue">setValue</a>(<span class="string">&quot;tv&quot;</span><span class="operator">,</span> <span class="keyword">false</span>);

 <span class="type"><a href="qstringlist.html">QStringList</a></span> groups <span class="operator">=</span> settings<span class="operator">.</span>childGroups();
 <span class="comment">// groups: [&quot;fridge&quot;]</span></pre>
<p>If a group is set using <a href="qsettings.html#beginGroup">beginGroup</a>(), the first-level keys in that group are returned, without the group prefix.</p>
<pre class="cpp"> settings<span class="operator">.</span><a href="qsettings.html#beginGroup">beginGroup</a>(<span class="string">&quot;fridge&quot;</span>);
 groups <span class="operator">=</span> settings<span class="operator">.</span>childGroups();
 <span class="comment">// groups: []</span></pre>
<p>You can navigate through the entire setting hierarchy using <a href="qsettings.html#childKeys">childKeys</a>() and childGroups() recursively.</p>
<p><b>See also </b><a href="qsettings.html#childKeys">childKeys</a>() and <a href="qsettings.html#allKeys">allKeys</a>().</p>
<!-- @@@childGroups -->
<!-- $$$childKeys[overload1]$$$childKeys -->
<h3 class="fn"><a name="childKeys"></a><span class="type"><a href="qstringlist.html">QStringList</a></span> QSettings::<span class="name">childKeys</span> () const</h3>
<p>Returns a list of all top-level keys that can be read using the <a href="qsettings.html">QSettings</a> object.</p>
<p>Example:</p>
<pre class="cpp"> <span class="type"><a href="qsettings.html">QSettings</a></span> settings;
 settings<span class="operator">.</span><a href="qsettings.html#setValue">setValue</a>(<span class="string">&quot;fridge/color&quot;</span><span class="operator">,</span> <span class="type"><a href="qt.html">Qt</a></span><span class="operator">::</span>white);
 settings<span class="operator">.</span><a href="qsettings.html#setValue">setValue</a>(<span class="string">&quot;fridge/size&quot;</span><span class="operator">,</span> <span class="type"><a href="qsize.html">QSize</a></span>(<span class="number">32</span><span class="operator">,</span> <span class="number">96</span>));
 settings<span class="operator">.</span><a href="qsettings.html#setValue">setValue</a>(<span class="string">&quot;sofa&quot;</span><span class="operator">,</span> <span class="keyword">true</span>);
 settings<span class="operator">.</span><a href="qsettings.html#setValue">setValue</a>(<span class="string">&quot;tv&quot;</span><span class="operator">,</span> <span class="keyword">false</span>);

 <span class="type"><a href="qstringlist.html">QStringList</a></span> keys <span class="operator">=</span> settings<span class="operator">.</span>childKeys();
 <span class="comment">// keys: [&quot;sofa&quot;, &quot;tv&quot;]</span></pre>
<p>If a group is set using <a href="qsettings.html#beginGroup">beginGroup</a>(), the top-level keys in that group are returned, without the group prefix:</p>
<pre class="cpp"> settings<span class="operator">.</span><a href="qsettings.html#beginGroup">beginGroup</a>(<span class="string">&quot;fridge&quot;</span>);
 keys <span class="operator">=</span> settings<span class="operator">.</span>childKeys();
 <span class="comment">// keys: [&quot;color&quot;, &quot;size&quot;]</span></pre>
<p>You can navigate through the entire setting hierarchy using childKeys() and <a href="qsettings.html#childGroups">childGroups</a>() recursively.</p>
<p><b>See also </b><a href="qsettings.html#childGroups">childGroups</a>() and <a href="qsettings.html#allKeys">allKeys</a>().</p>
<!-- @@@childKeys -->
<!-- $$$clear[overload1]$$$clear -->
<h3 class="fn"><a name="clear"></a><span class="type">void</span> QSettings::<span class="name">clear</span> ()</h3>
<p>Removes all entries in the primary location associated to this <a href="qsettings.html">QSettings</a> object.</p>
<p>Entries in fallback locations are not removed.</p>
<p>If you only want to remove the entries in the current <a href="qsettings.html#group">group</a>(), use remove(&quot;&quot;) instead.</p>
<p><b>See also </b><a href="qsettings.html#remove">remove</a>() and <a href="qsettings.html#setFallbacksEnabled">setFallbacksEnabled</a>().</p>
<!-- @@@clear -->
<!-- $$$contains[overload1]$$$containsconstQString& -->
<h3 class="fn"><a name="contains"></a><span class="type">bool</span> QSettings::<span class="name">contains</span> ( const <span class="type"><a href="qstring.html">QString</a></span> &amp; <i>key</i> ) const</h3>
<p>Returns true if there exists a setting called <i>key</i>; returns false otherwise.</p>
<p>If a group is set using <a href="qsettings.html#beginGroup">beginGroup</a>(), <i>key</i> is taken to be relative to that group.</p>
<p>Note that the Windows registry and INI files use case-insensitive keys, whereas the Carbon Preferences API on Mac OS X uses case-sensitive keys. To avoid portability problems, see the <a href="qsettings.html#section-and-key-syntax">Section and Key Syntax</a> rules.</p>
<p><b>See also </b><a href="qsettings.html#value">value</a>() and <a href="qsettings.html#setValue">setValue</a>().</p>
<!-- @@@contains -->
<!-- $$$defaultFormat[overload1]$$$defaultFormat -->
<h3 class="fn"><a name="defaultFormat"></a><span class="type"><a href="qsettings.html#Format-enum">Format</a></span> QSettings::<span class="name">defaultFormat</span> ()<tt> [static]</tt></h3>
<p>Returns default file format used for storing settings for the <a href="qsettings.html">QSettings</a>(<a href="qobject.html">QObject</a> *) constructor. If no default format is set, <a href="qsettings.html#Format-enum">QSettings::NativeFormat</a> is used.</p>
<p>This function was introduced in Qt 4.4.</p>
<p><b>See also </b><a href="qsettings.html#setDefaultFormat">setDefaultFormat</a>() and <a href="qsettings.html#format">format</a>().</p>
<!-- @@@defaultFormat -->
<!-- $$$endArray[overload1]$$$endArray -->
<h3 class="fn"><a name="endArray"></a><span class="type">void</span> QSettings::<span class="name">endArray</span> ()</h3>
<p>Closes the array that was started using <a href="qsettings.html#beginReadArray">beginReadArray</a>() or <a href="qsettings.html#beginWriteArray">beginWriteArray</a>().</p>
<p><b>See also </b><a href="qsettings.html#beginReadArray">beginReadArray</a>() and <a href="qsettings.html#beginWriteArray">beginWriteArray</a>().</p>
<!-- @@@endArray -->
<!-- $$$endGroup[overload1]$$$endGroup -->
<h3 class="fn"><a name="endGroup"></a><span class="type">void</span> QSettings::<span class="name">endGroup</span> ()</h3>
<p>Resets the group to what it was before the corresponding <a href="qsettings.html#beginGroup">beginGroup</a>() call.</p>
<p>Example:</p>
<pre class="cpp"> settings<span class="operator">.</span><a href="qsettings.html#beginGroup">beginGroup</a>(<span class="string">&quot;alpha&quot;</span>);
 <span class="comment">// settings.group() == &quot;alpha&quot;</span>

 settings<span class="operator">.</span><a href="qsettings.html#beginGroup">beginGroup</a>(<span class="string">&quot;beta&quot;</span>);
 <span class="comment">// settings.group() == &quot;alpha/beta&quot;</span>

 settings<span class="operator">.</span>endGroup();
 <span class="comment">// settings.group() == &quot;alpha&quot;</span>

 settings<span class="operator">.</span>endGroup();
 <span class="comment">// settings.group() == &quot;&quot;</span></pre>
<p><b>See also </b><a href="qsettings.html#beginGroup">beginGroup</a>() and <a href="qsettings.html#group">group</a>().</p>
<!-- @@@endGroup -->
<!-- $$$event[overload1]$$$eventQEvent* -->
<h3 class="fn"><a name="event"></a><span class="type">bool</span> QSettings::<span class="name">event</span> ( <span class="type"><a href="qevent.html">QEvent</a></span> * <i>event</i> )<tt> [virtual protected]</tt></h3>
<p>Reimplemented from <a href="qobject.html#event">QObject::event</a>().</p>
<!-- @@@event -->
<!-- $$$fallbacksEnabled[overload1]$$$fallbacksEnabled -->
<h3 class="fn"><a name="fallbacksEnabled"></a><span class="type">bool</span> QSettings::<span class="name">fallbacksEnabled</span> () const</h3>
<p>Returns true if fallbacks are enabled; returns false otherwise.</p>
<p>By default, fallbacks are enabled.</p>
<p><b>See also </b><a href="qsettings.html#setFallbacksEnabled">setFallbacksEnabled</a>().</p>
<!-- @@@fallbacksEnabled -->
<!-- $$$fileName[overload1]$$$fileName -->
<h3 class="fn"><a name="fileName"></a><span class="type"><a href="qstring.html">QString</a></span> QSettings::<span class="name">fileName</span> () const</h3>
<p>Returns the path where settings written using this <a href="qsettings.html">QSettings</a> object are stored.</p>
<p>On Windows, if the format is <a href="qsettings.html#Format-enum">QSettings::NativeFormat</a>, the return value is a system registry path, not a file path.</p>
<p><b>See also </b><a href="qsettings.html#isWritable">isWritable</a>() and <a href="qsettings.html#format">format</a>().</p>
<!-- @@@fileName -->
<!-- $$$format[overload1]$$$format -->
<h3 class="fn"><a name="format"></a><span class="type"><a href="qsettings.html#Format-enum">Format</a></span> QSettings::<span class="name">format</span> () const</h3>
<p>Returns the format used for storing the settings.</p>
<p>This function was introduced in Qt 4.4.</p>
<p><b>See also </b><a href="qsettings.html#defaultFormat">defaultFormat</a>(), <a href="qsettings.html#fileName">fileName</a>(), <a href="qsettings.html#scope">scope</a>(), <a href="qsettings.html#organizationName">organizationName</a>(), and <a href="qsettings.html#applicationName">applicationName</a>().</p>
<!-- @@@format -->
<!-- $$$group[overload1]$$$group -->
<h3 class="fn"><a name="group"></a><span class="type"><a href="qstring.html">QString</a></span> QSettings::<span class="name">group</span> () const</h3>
<p>Returns the current group.</p>
<p><b>See also </b><a href="qsettings.html#beginGroup">beginGroup</a>() and <a href="qsettings.html#endGroup">endGroup</a>().</p>
<!-- @@@group -->
<!-- $$$iniCodec[overload1]$$$iniCodec -->
<h3 class="fn"><a name="iniCodec"></a><span class="type"><a href="qtextcodec.html">QTextCodec</a></span> * QSettings::<span class="name">iniCodec</span> () const</h3>
<p>Returns the codec that is used for accessing INI files. By default, no codec is used, so a null pointer is returned.</p>
<p>This function was introduced in Qt 4.5.</p>
<p><b>See also </b><a href="qsettings.html#setIniCodec">setIniCodec</a>().</p>
<!-- @@@iniCodec -->
<!-- $$$isWritable[overload1]$$$isWritable -->
<h3 class="fn"><a name="isWritable"></a><span class="type">bool</span> QSettings::<span class="name">isWritable</span> () const</h3>
<p>Returns true if settings can be written using this <a href="qsettings.html">QSettings</a> object; returns false otherwise.</p>
<p>One reason why isWritable() might return false is if <a href="qsettings.html">QSettings</a> operates on a read-only file.</p>
<p><b>Warning:</b> This function is not perfectly reliable, because the file permissions can change at any time.</p>
<p><b>See also </b><a href="qsettings.html#fileName">fileName</a>(), <a href="qsettings.html#status">status</a>(), and <a href="qsettings.html#sync">sync</a>().</p>
<!-- @@@isWritable -->
<!-- $$$organizationName[overload1]$$$organizationName -->
<h3 class="fn"><a name="organizationName"></a><span class="type"><a href="qstring.html">QString</a></span> QSettings::<span class="name">organizationName</span> () const</h3>
<p>Returns the organization name used for storing the settings.</p>
<p>This function was introduced in Qt 4.4.</p>
<p><b>See also </b><a href="qcoreapplication.html#organizationName-prop">QCoreApplication::organizationName</a>(), <a href="qsettings.html#format">format</a>(), <a href="qsettings.html#scope">scope</a>(), and <a href="qsettings.html#applicationName">applicationName</a>().</p>
<!-- @@@organizationName -->
<!-- $$$registerFormat[overload1]$$$registerFormatconstQString&ReadFuncWriteFuncQt::CaseSensitivity -->
<h3 class="fn"><a name="registerFormat"></a><span class="type"><a href="qsettings.html#Format-enum">Format</a></span> QSettings::<span class="name">registerFormat</span> ( const <span class="type"><a href="qstring.html">QString</a></span> &amp; <i>extension</i>, <span class="type"><a href="qsettings.html#ReadFunc-typedef">ReadFunc</a></span> <i>readFunc</i>, <span class="type"><a href="qsettings.html#WriteFunc-typedef">WriteFunc</a></span> <i>writeFunc</i>, <span class="type"><a href="qt.html#CaseSensitivity-enum">Qt::CaseSensitivity</a></span> <i>caseSensitivity</i> = Qt::CaseSensitive )<tt> [static]</tt></h3>
<p>Registers a custom storage format. On success, returns a special Format value that can then be passed to the <a href="qsettings.html">QSettings</a> constructor. On failure, returns <a href="qsettings.html#Format-enum">InvalidFormat</a>.</p>
<p>The <i>extension</i> is the file extension associated to the format (without the '.').</p>
<p>The <i>readFunc</i> and <i>writeFunc</i> parameters are pointers to functions that read and write a set of key/value pairs. The <a href="qiodevice.html">QIODevice</a> parameter to the read and write functions is always opened in binary mode (i.e&#x2e;, without the <a href="qiodevice.html#OpenModeFlag-enum">QIODevice::Text</a> flag).</p>
<p>The <i>caseSensitivity</i> parameter specifies whether keys are case sensitive or not. This makes a difference when looking up values using <a href="qsettings.html">QSettings</a>. The default is case sensitive.</p>
<p>By default, if you use one of the constructors that work in terms of an organization name and an application name, the file system locations used are the same as for <a href="qsettings.html#Format-enum">IniFormat</a>. Use <a href="qsettings.html#setPath">setPath</a>() to specify other locations.</p>
<p>Example:</p>
<pre class="cpp"> <span class="type">bool</span> readXmlFile(<span class="type"><a href="qiodevice.html">QIODevice</a></span> <span class="operator">&amp;</span>device<span class="operator">,</span> <span class="type"><a href="qsettings.html">QSettings</a></span><span class="operator">::</span>SettingsMap <span class="operator">&amp;</span>map);
 <span class="type">bool</span> writeXmlFile(<span class="type"><a href="qiodevice.html">QIODevice</a></span> <span class="operator">&amp;</span>device<span class="operator">,</span> <span class="keyword">const</span> <span class="type"><a href="qsettings.html">QSettings</a></span><span class="operator">::</span>SettingsMap <span class="operator">&amp;</span>map);

 <span class="type">int</span> main(<span class="type">int</span> argc<span class="operator">,</span> <span class="type">char</span> <span class="operator">*</span>argv<span class="operator">[</span><span class="operator">]</span>)
 {
     <span class="keyword">const</span> <span class="type"><a href="qsettings.html">QSettings</a></span><span class="operator">::</span>Format XmlFormat <span class="operator">=</span>
             <span class="type"><a href="qsettings.html">QSettings</a></span><span class="operator">::</span>registerFormat(<span class="string">&quot;xml&quot;</span><span class="operator">,</span> readXmlFile<span class="operator">,</span> writeXmlFile);

     <span class="type"><a href="qsettings.html">QSettings</a></span> settings(XmlFormat<span class="operator">,</span> <span class="type"><a href="qsettings.html">QSettings</a></span><span class="operator">::</span>UserScope<span class="operator">,</span> <span class="string">&quot;MySoft&quot;</span><span class="operator">,</span>
                        <span class="string">&quot;Star Runner&quot;</span>);

     <span class="operator">.</span><span class="operator">.</span><span class="operator">.</span>
 }</pre>
<p><b>Note:</b> This function is <a href="threads-reentrancy.html#thread-safe">thread-safe</a>.</p>
<p>This function was introduced in Qt 4.1.</p>
<p><b>See also </b><a href="qsettings.html#setPath">setPath</a>().</p>
<!-- @@@registerFormat -->
<!-- $$$remove[overload1]$$$removeconstQString& -->
<h3 class="fn"><a name="remove"></a><span class="type">void</span> QSettings::<span class="name">remove</span> ( const <span class="type"><a href="qstring.html">QString</a></span> &amp; <i>key</i> )</h3>
<p>Removes the setting <i>key</i> and any sub-settings of <i>key</i>.</p>
<p>Example:</p>
<pre class="cpp"> <span class="type"><a href="qsettings.html">QSettings</a></span> settings;
 settings<span class="operator">.</span><a href="qsettings.html#setValue">setValue</a>(<span class="string">&quot;ape&quot;</span>);
 settings<span class="operator">.</span><a href="qsettings.html#setValue">setValue</a>(<span class="string">&quot;monkey&quot;</span><span class="operator">,</span> <span class="number">1</span>);
 settings<span class="operator">.</span><a href="qsettings.html#setValue">setValue</a>(<span class="string">&quot;monkey/sea&quot;</span><span class="operator">,</span> <span class="number">2</span>);
 settings<span class="operator">.</span><a href="qsettings.html#setValue">setValue</a>(<span class="string">&quot;monkey/doe&quot;</span><span class="operator">,</span> <span class="number">4</span>);

 settings<span class="operator">.</span>remove(<span class="string">&quot;monkey&quot;</span>);
 <span class="type"><a href="qstringlist.html">QStringList</a></span> keys <span class="operator">=</span> settings<span class="operator">.</span><a href="qsettings.html#allKeys">allKeys</a>();
 <span class="comment">// keys: [&quot;ape&quot;]</span></pre>
<p>Be aware that if one of the fallback locations contains a setting with the same key, that setting will be visible after calling remove().</p>
<p>If <i>key</i> is an empty string, all keys in the current <a href="qsettings.html#group">group</a>() are removed. For example:</p>
<pre class="cpp"> <span class="type"><a href="qsettings.html">QSettings</a></span> settings;
 settings<span class="operator">.</span><a href="qsettings.html#setValue">setValue</a>(<span class="string">&quot;ape&quot;</span>);
 settings<span class="operator">.</span><a href="qsettings.html#setValue">setValue</a>(<span class="string">&quot;monkey&quot;</span><span class="operator">,</span> <span class="number">1</span>);
 settings<span class="operator">.</span><a href="qsettings.html#setValue">setValue</a>(<span class="string">&quot;monkey/sea&quot;</span><span class="operator">,</span> <span class="number">2</span>);
 settings<span class="operator">.</span><a href="qsettings.html#setValue">setValue</a>(<span class="string">&quot;monkey/doe&quot;</span><span class="operator">,</span> <span class="number">4</span>);

 settings<span class="operator">.</span><a href="qsettings.html#beginGroup">beginGroup</a>(<span class="string">&quot;monkey&quot;</span>);
 settings<span class="operator">.</span>remove(<span class="string">&quot;&quot;</span>);
 settings<span class="operator">.</span><a href="qsettings.html#endGroup">endGroup</a>();

 <span class="type"><a href="qstringlist.html">QStringList</a></span> keys <span class="operator">=</span> settings<span class="operator">.</span><a href="qsettings.html#allKeys">allKeys</a>();
 <span class="comment">// keys: [&quot;ape&quot;]</span></pre>
<p>Note that the Windows registry and INI files use case-insensitive keys, whereas the Carbon Preferences API on Mac OS X uses case-sensitive keys. To avoid portability problems, see the <a href="qsettings.html#section-and-key-syntax">Section and Key Syntax</a> rules.</p>
<p><b>See also </b><a href="qsettings.html#setValue">setValue</a>(), <a href="qsettings.html#value">value</a>(), and <a href="qsettings.html#contains">contains</a>().</p>
<!-- @@@remove -->
<!-- $$$scope[overload1]$$$scope -->
<h3 class="fn"><a name="scope"></a><span class="type"><a href="qsettings.html#Scope-enum">Scope</a></span> QSettings::<span class="name">scope</span> () const</h3>
<p>Returns the scope used for storing the settings.</p>
<p>This function was introduced in Qt 4.4.</p>
<p><b>See also </b><a href="qsettings.html#format">format</a>(), <a href="qsettings.html#organizationName">organizationName</a>(), and <a href="qsettings.html#applicationName">applicationName</a>().</p>
<!-- @@@scope -->
<!-- $$$setArrayIndex[overload1]$$$setArrayIndexint -->
<h3 class="fn"><a name="setArrayIndex"></a><span class="type">void</span> QSettings::<span class="name">setArrayIndex</span> ( <span class="type">int</span> <i>i</i> )</h3>
<p>Sets the current array index to <i>i</i>. Calls to functions such as <a href="qsettings.html#setValue">setValue</a>(), <a href="qsettings.html#value">value</a>(), <a href="qsettings.html#remove">remove</a>(), and <a href="qsettings.html#contains">contains</a>() will operate on the array entry at that index.</p>
<p>You must call <a href="qsettings.html#beginReadArray">beginReadArray</a>() or <a href="qsettings.html#beginWriteArray">beginWriteArray</a>() before you can call this function.</p>
<!-- @@@setArrayIndex -->
<!-- $$$setDefaultFormat[overload1]$$$setDefaultFormatFormat -->
<h3 class="fn"><a name="setDefaultFormat"></a><span class="type">void</span> QSettings::<span class="name">setDefaultFormat</span> ( <span class="type"><a href="qsettings.html#Format-enum">Format</a></span> <i>format</i> )<tt> [static]</tt></h3>
<p>Sets the default file format to the given <i>format</i>, which is used for storing settings for the <a href="qsettings.html">QSettings</a>(<a href="qobject.html">QObject</a> *) constructor.</p>
<p>If no default format is set, <a href="qsettings.html#Format-enum">QSettings::NativeFormat</a> is used. See the documentation for the <a href="qsettings.html">QSettings</a> constructor you are using to see if that constructor will ignore this function.</p>
<p>This function was introduced in Qt 4.4.</p>
<p><b>See also </b><a href="qsettings.html#defaultFormat">defaultFormat</a>() and <a href="qsettings.html#format">format</a>().</p>
<!-- @@@setDefaultFormat -->
<!-- $$$setFallbacksEnabled[overload1]$$$setFallbacksEnabledbool -->
<h3 class="fn"><a name="setFallbacksEnabled"></a><span class="type">void</span> QSettings::<span class="name">setFallbacksEnabled</span> ( <span class="type">bool</span> <i>b</i> )</h3>
<p>Sets whether fallbacks are enabled to <i>b</i>.</p>
<p>By default, fallbacks are enabled.</p>
<p><b>See also </b><a href="qsettings.html#fallbacksEnabled">fallbacksEnabled</a>().</p>
<!-- @@@setFallbacksEnabled -->
<!-- $$$setIniCodec[overload1]$$$setIniCodecQTextCodec* -->
<h3 class="fn"><a name="setIniCodec"></a><span class="type">void</span> QSettings::<span class="name">setIniCodec</span> ( <span class="type"><a href="qtextcodec.html">QTextCodec</a></span> * <i>codec</i> )</h3>
<p>Sets the codec for accessing INI files (including <tt>.conf</tt> files on Unix) to <i>codec</i>. The codec is used for decoding any data that is read from the INI file, and for encoding any data that is written to the file. By default, no codec is used, and non-ASCII characters are encoded using standard INI escape sequences.</p>
<p><b>Warning:</b> The codec must be set immediately after creating the <a href="qsettings.html">QSettings</a> object, before accessing any data.</p>
<p>This function was introduced in Qt 4.5.</p>
<p><b>See also </b><a href="qsettings.html#iniCodec">iniCodec</a>().</p>
<!-- @@@setIniCodec -->
<!-- $$$setIniCodec$$$setIniCodecconstchar* -->
<h3 class="fn"><a name="setIniCodec-2"></a><span class="type">void</span> QSettings::<span class="name">setIniCodec</span> ( const <span class="type">char</span> * <i>codecName</i> )</h3>
<p>This is an overloaded function.</p>
<p>Sets the codec for accessing INI files (including <tt>.conf</tt> files on Unix) to the <a href="qtextcodec.html">QTextCodec</a> for the encoding specified by <i>codecName</i>. Common values for <tt>codecName</tt> include &quot;ISO 8859-1&quot;, &quot;UTF-8&quot;, and &quot;UTF-16&quot;. If the encoding isn't recognized, nothing happens.</p>
<p>This function was introduced in Qt 4.5.</p>
<p><b>See also </b><a href="qtextcodec.html#codecForName">QTextCodec::codecForName</a>().</p>
<!-- @@@setIniCodec -->
<!-- $$$setPath[overload1]$$$setPathFormatScopeconstQString& -->
<h3 class="fn"><a name="setPath"></a><span class="type">void</span> QSettings::<span class="name">setPath</span> ( <span class="type"><a href="qsettings.html#Format-enum">Format</a></span> <i>format</i>, <span class="type"><a href="qsettings.html#Scope-enum">Scope</a></span> <i>scope</i>, const <span class="type"><a href="qstring.html">QString</a></span> &amp; <i>path</i> )<tt> [static]</tt></h3>
<p>Sets the path used for storing settings for the given <i>format</i> and <i>scope</i>, to <i>path</i>. The <i>format</i> can be a custom format.</p>
<p>The table below summarizes the default values:</p>
<table class="generic">
<thead><tr class="qt-style"><th >Platform</th><th >Format</th><th >Scope</th><th >Path</th></tr></thead>
<tr valign="top" class="odd"><td  rowspan="2">Windows</td><td  rowspan="2"><a href="qsettings.html#Format-enum">IniFormat</a></td><td ><a href="qsettings.html#Scope-enum">UserScope</a></td><td ><tt>%APPDATA%</tt></td></tr>
<tr valign="top" class="even"><td ><a href="qsettings.html#Scope-enum">SystemScope</a></td><td ><tt>%COMMON_APPDATA%</tt></td></tr>
<tr valign="top" class="odd"><td  rowspan="2">Unix</td><td  rowspan="2"><a href="qsettings.html#Format-enum">NativeFormat</a>, <a href="qsettings.html#Format-enum">IniFormat</a></td><td ><a href="qsettings.html#Scope-enum">UserScope</a></td><td ><tt>$HOME/.config</tt></td></tr>
<tr valign="top" class="even"><td ><a href="qsettings.html#Scope-enum">SystemScope</a></td><td ><tt>/etc/xdg</tt></td></tr>
<tr valign="top" class="odd"><td  rowspan="2">Qt for Embedded Linux</td><td  rowspan="2"><a href="qsettings.html#Format-enum">NativeFormat</a>, <a href="qsettings.html#Format-enum">IniFormat</a></td><td ><a href="qsettings.html#Scope-enum">UserScope</a></td><td ><tt>$HOME/Settings</tt></td></tr>
<tr valign="top" class="even"><td ><a href="qsettings.html#Scope-enum">SystemScope</a></td><td ><tt>/etc/xdg</tt></td></tr>
<tr valign="top" class="odd"><td  rowspan="2">Mac OS X</td><td  rowspan="2"><a href="qsettings.html#Format-enum">IniFormat</a></td><td ><a href="qsettings.html#Scope-enum">UserScope</a></td><td ><tt>$HOME/.config</tt></td></tr>
<tr valign="top" class="even"><td ><a href="qsettings.html#Scope-enum">SystemScope</a></td><td ><tt>/etc/xdg</tt></td></tr>
<tr valign="top" class="odd"><td  rowspan="2">Symbian</td><td  rowspan="2"><a href="qsettings.html#Format-enum">NativeFormat</a>, <a href="qsettings.html#Format-enum">IniFormat</a></td><td ><a href="qsettings.html#Scope-enum">UserScope</a></td><td ><tt>c:/data/.config</tt></td></tr>
<tr valign="top" class="even"><td ><a href="qsettings.html#Scope-enum">SystemScope</a></td><td ><tt>&lt;drive&gt;/private/&lt;uid&gt;</tt></td></tr>
</table>
<p>The default <a href="qsettings.html#Scope-enum">UserScope</a> paths on Unix and Mac OS X (<tt>$HOME/.config</tt> or $HOME/Settings) can be overridden by the user by setting the <tt>XDG_CONFIG_HOME</tt> environment variable. The default <a href="qsettings.html#Scope-enum">SystemScope</a> paths on Unix and Mac OS X (<tt>/etc/xdg</tt>) can be overridden when building the Qt library using the <tt>configure</tt> script's <tt>--sysconfdir</tt> flag (see <a href="qlibraryinfo.html">QLibraryInfo</a> for details).</p>
<p>Setting the <a href="qsettings.html#Format-enum">NativeFormat</a> paths on Windows and Mac OS X has no effect.</p>
<p><b>Warning:</b> This function doesn't affect existing <a href="qsettings.html">QSettings</a> objects.</p>
<p>This function was introduced in Qt 4.1.</p>
<p><b>See also </b><a href="qsettings.html#registerFormat">registerFormat</a>().</p>
<!-- @@@setPath -->
<!-- $$$setValue[overload1]$$$setValueconstQString&constQVariant& -->
<h3 class="fn"><a name="setValue"></a><span class="type">void</span> QSettings::<span class="name">setValue</span> ( const <span class="type"><a href="qstring.html">QString</a></span> &amp; <i>key</i>, const <span class="type"><a href="qvariant.html">QVariant</a></span> &amp; <i>value</i> )</h3>
<p>Sets the value of setting <i>key</i> to <i>value</i>. If the <i>key</i> already exists, the previous value is overwritten.</p>
<p>Note that the Windows registry and INI files use case-insensitive keys, whereas the Carbon Preferences API on Mac OS X uses case-sensitive keys. To avoid portability problems, see the <a href="qsettings.html#section-and-key-syntax">Section and Key Syntax</a> rules.</p>
<p>Example:</p>
<pre class="cpp"> <span class="type"><a href="qsettings.html">QSettings</a></span> settings;
 settings<span class="operator">.</span>setValue(<span class="string">&quot;interval&quot;</span><span class="operator">,</span> <span class="number">30</span>);
 settings<span class="operator">.</span><a href="qsettings.html#value">value</a>(<span class="string">&quot;interval&quot;</span>)<span class="operator">.</span>toInt();     <span class="comment">// returns 30</span>

 settings<span class="operator">.</span>setValue(<span class="string">&quot;interval&quot;</span><span class="operator">,</span> <span class="number">6.55</span>);
 settings<span class="operator">.</span><a href="qsettings.html#value">value</a>(<span class="string">&quot;interval&quot;</span>)<span class="operator">.</span>toDouble();  <span class="comment">// returns 6.55</span></pre>
<p><b>See also </b><a href="qsettings.html#value">value</a>(), <a href="qsettings.html#remove">remove</a>(), and <a href="qsettings.html#contains">contains</a>().</p>
<!-- @@@setValue -->
<!-- $$$status[overload1]$$$status -->
<h3 class="fn"><a name="status"></a><span class="type"><a href="qsettings.html#Status-enum">Status</a></span> QSettings::<span class="name">status</span> () const</h3>
<p>Returns a status code indicating the first error that was met by <a href="qsettings.html">QSettings</a>, or <a href="qsettings.html#Status-enum">QSettings::NoError</a> if no error occurred.</p>
<p>Be aware that <a href="qsettings.html">QSettings</a> delays performing some operations. For this reason, you might want to call <a href="qsettings.html#sync">sync</a>() to ensure that the data stored in <a href="qsettings.html">QSettings</a> is written to disk before calling status().</p>
<p><b>See also </b><a href="qsettings.html#sync">sync</a>().</p>
<!-- @@@status -->
<!-- $$$sync[overload1]$$$sync -->
<h3 class="fn"><a name="sync"></a><span class="type">void</span> QSettings::<span class="name">sync</span> ()</h3>
<p>Writes any unsaved changes to permanent storage, and reloads any settings that have been changed in the meantime by another application.</p>
<p>This function is called automatically from <a href="qsettings.html">QSettings</a>'s destructor and by the event loop at regular intervals, so you normally don't need to call it yourself.</p>
<p><b>See also </b><a href="qsettings.html#status">status</a>().</p>
<!-- @@@sync -->
<!-- $$$value[overload1]$$$valueconstQString&constQVariant& -->
<h3 class="fn"><a name="value"></a><span class="type"><a href="qvariant.html">QVariant</a></span> QSettings::<span class="name">value</span> ( const <span class="type"><a href="qstring.html">QString</a></span> &amp; <i>key</i>, const <span class="type"><a href="qvariant.html">QVariant</a></span> &amp; <i>defaultValue</i> = QVariant() ) const</h3>
<p>Returns the value for setting <i>key</i>. If the setting doesn't exist, returns <i>defaultValue</i>.</p>
<p>If no default value is specified, a default <a href="qvariant.html">QVariant</a> is returned.</p>
<p>Note that the Windows registry and INI files use case-insensitive keys, whereas the Carbon Preferences API on Mac OS X uses case-sensitive keys. To avoid portability problems, see the <a href="qsettings.html#section-and-key-syntax">Section and Key Syntax</a> rules.</p>
<p>Example:</p>
<pre class="cpp"> <span class="type"><a href="qsettings.html">QSettings</a></span> settings;
 settings<span class="operator">.</span><a href="qsettings.html#setValue">setValue</a>(<span class="string">&quot;animal/snake&quot;</span><span class="operator">,</span> <span class="number">58</span>);
 settings<span class="operator">.</span>value(<span class="string">&quot;animal/snake&quot;</span><span class="operator">,</span> <span class="number">1024</span>)<span class="operator">.</span>toInt();   <span class="comment">// returns 58</span>
 settings<span class="operator">.</span>value(<span class="string">&quot;animal/zebra&quot;</span><span class="operator">,</span> <span class="number">1024</span>)<span class="operator">.</span>toInt();   <span class="comment">// returns 1024</span>
 settings<span class="operator">.</span>value(<span class="string">&quot;animal/zebra&quot;</span>)<span class="operator">.</span>toInt();         <span class="comment">// returns 0</span></pre>
<p><b>See also </b><a href="qsettings.html#setValue">setValue</a>(), <a href="qsettings.html#contains">contains</a>(), and <a href="qsettings.html#remove">remove</a>().</p>
<!-- @@@value -->
</div>
      </div>
    </div>
    </div> 
    <div class="ft">
      <span></span>
    </div>
  </div> 
  <div class="footer">
    <p>
      <acronym title="Copyright">&copy;</acronym> 2015 The Qt Company Ltd.
      Documentation contributions included herein are the copyrights of
      their respective owners.</p>
    <br />
    <p>
      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.</p>
    <p>
      Documentation sources may be obtained from <a href="http://www.qt-project.org">
      www.qt-project.org</a>.</p>
    <br />
    <p>
      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. <a title="Privacy Policy"
      href="http://en.gitorious.org/privacy_policy/">Privacy Policy</a></p>
  </div>

  <script src="scripts/functions.js" type="text/javascript"></script>
</body>
</html>