<class name="QSettings" doc="/**
&lt;p&gt;The &lt;a href=&quot;QSettings.html#QSettings(com.trolltech.qt.core.QSettings.Scope, java.lang.String, java.lang.String, com.trolltech.qt.core.QObject)&quot;&gt;&lt;tt&gt;QSettings&lt;/tt&gt;&lt;/a&gt; class provides persistent platform-independent application settings.&lt;/p&gt;
&lt;p&gt;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.&lt;/p&gt;
&lt;p&gt;&lt;a href=&quot;QSettings.html#QSettings(com.trolltech.qt.core.QSettings.Scope, java.lang.String, java.lang.String, com.trolltech.qt.core.QObject)&quot;&gt;&lt;tt&gt;QSettings&lt;/tt&gt;&lt;/a&gt; is an abstraction around these technologies, enabling you to save and restore application settings in a portable manner. It also supports custom storage formats&lt;/tt&gt;.&lt;/p&gt;
&lt;p&gt;&lt;a href=&quot;QSettings.html#QSettings(com.trolltech.qt.core.QSettings.Scope, java.lang.String, java.lang.String, com.trolltech.qt.core.QObject)&quot;&gt;&lt;tt&gt;QSettings&lt;/tt&gt;&lt;/a&gt;'s API is based on &lt;a href=&quot;%2E%2E/porting4.html#qvariant&quot;&gt;&lt;tt&gt;QVariant&lt;/tt&gt;&lt;/a&gt;, allowing you to save most value-based types, such as &lt;a href=&quot;%2E%2E/porting4.html#qstring&quot;&gt;&lt;tt&gt;QString&lt;/tt&gt;&lt;/a&gt;, &lt;a href=&quot;QRect.html&quot;&gt;&lt;tt&gt;QRect&lt;/tt&gt;&lt;/a&gt;, and &lt;a href=&quot;%2E%2E/gui/QImage.html&quot;&gt;&lt;tt&gt;QImage&lt;/tt&gt;&lt;/a&gt;, with the minimum of effort.&lt;/p&gt;
&lt;p&gt;If all you need is a non-persistent memory-based structure, consider using QMap&amp;lt;&lt;a href=&quot;%2E%2E/porting4.html#qstring&quot;&gt;&lt;tt&gt;QString&lt;/tt&gt;&lt;/a&gt;, &lt;a href=&quot;%2E%2E/porting4.html#qvariant&quot;&gt;&lt;tt&gt;QVariant&lt;/tt&gt;&lt;/a&gt;&amp;gt; instead.&lt;/p&gt;
&lt;ul&gt;&lt;li&gt;&lt;a href=&quot;#basic-usage&quot;&gt;Basic Usage&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href=&quot;#qvariant-and-gui-types&quot;&gt;QVariant and GUI Types&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href=&quot;#key-syntax&quot;&gt;Key Syntax&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href=&quot;#fallback-mechanism&quot;&gt;Fallback Mechanism&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href=&quot;#restoring-the-state-of-a-gui-application&quot;&gt;Restoring the State of a GUI Application&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href=&quot;#accessing-settings-from-multiple-threads-or-processes-simultaneously&quot;&gt;Accessing Settings from Multiple Threads or Processes Simultaneously&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href=&quot;#platform-specific-notes&quot;&gt;Platform-Specific Notes&lt;/a&gt;&lt;/li&gt;
&lt;/ul&gt;
&lt;a name=&quot;basic-usage&quot;&gt;&lt;/a&gt;
&lt;h3&gt;Basic Usage&lt;/h3&gt;
&lt;p&gt;When creating a &lt;a href=&quot;QSettings.html#QSettings(com.trolltech.qt.core.QSettings.Scope, java.lang.String, java.lang.String, com.trolltech.qt.core.QObject)&quot;&gt;&lt;tt&gt;QSettings&lt;/tt&gt;&lt;/a&gt; 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 &lt;a href=&quot;QSettings.html#QSettings(com.trolltech.qt.core.QSettings.Scope, java.lang.String, java.lang.String, com.trolltech.qt.core.QObject)&quot;&gt;&lt;tt&gt;QSettings&lt;/tt&gt;&lt;/a&gt; object as follows:&lt;/p&gt;
&lt;pre&gt;        QSettings settings(&amp;quot;MySoft&amp;quot;, &amp;quot;Star Runner&amp;quot;);&lt;/pre&gt;
&lt;p&gt;&lt;a href=&quot;QSettings.html#QSettings(com.trolltech.qt.core.QSettings.Scope, java.lang.String, java.lang.String, com.trolltech.qt.core.QObject)&quot;&gt;&lt;tt&gt;QSettings&lt;/tt&gt;&lt;/a&gt; objects can be created either on the stack or on the heap (i.e&amp;#x2e; using &lt;tt&gt;new&lt;/tt&gt;). Constructing and destroying a &lt;a href=&quot;QSettings.html#QSettings(com.trolltech.qt.core.QSettings.Scope, java.lang.String, java.lang.String, com.trolltech.qt.core.QObject)&quot;&gt;&lt;tt&gt;QSettings&lt;/tt&gt;&lt;/a&gt; object is very fast.&lt;/p&gt;
&lt;p&gt;If you use &lt;a href=&quot;QSettings.html#QSettings(com.trolltech.qt.core.QSettings.Scope, java.lang.String, java.lang.String, com.trolltech.qt.core.QObject)&quot;&gt;&lt;tt&gt;QSettings&lt;/tt&gt;&lt;/a&gt; from many places in your application, you might want to specify the organization name and the application name using QCoreApplication::setOrganizationName() and QCoreApplication::setApplicationName(), and then use the default &lt;a href=&quot;QSettings.html#QSettings(com.trolltech.qt.core.QSettings.Scope, java.lang.String, java.lang.String, com.trolltech.qt.core.QObject)&quot;&gt;&lt;tt&gt;QSettings&lt;/tt&gt;&lt;/a&gt; constructor:&lt;/p&gt;
&lt;pre&gt;        QCoreApplication::setOrganizationName(&amp;quot;MySoft&amp;quot;);
        QCoreApplication::setOrganizationDomain(&amp;quot;mysoft.com&amp;quot;);
        QCoreApplication::setApplicationName(&amp;quot;Star Runner&amp;quot;);
        ...
        QSettings settings;&lt;/pre&gt;
&lt;p&gt;(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 &lt;a href=&quot;QSettings.html#platform-specific-notes&quot;&gt;Platform-Specific Notes&lt;/tt&gt;&lt;/a&gt; below for details.)&lt;/p&gt;
&lt;p&gt;&lt;a href=&quot;QSettings.html#QSettings(com.trolltech.qt.core.QSettings.Scope, java.lang.String, java.lang.String, com.trolltech.qt.core.QObject)&quot;&gt;&lt;tt&gt;QSettings&lt;/tt&gt;&lt;/a&gt; stores settings. Each setting consists of a &lt;a href=&quot;%2E%2E/porting4.html#qstring&quot;&gt;&lt;tt&gt;QString&lt;/tt&gt;&lt;/a&gt; that specifies the setting's name (the &lt;i&gt;key&lt;/i&gt;) and a &lt;a href=&quot;%2E%2E/porting4.html#qvariant&quot;&gt;&lt;tt&gt;QVariant&lt;/tt&gt;&lt;/a&gt; that stores the data associated with the key. To write a setting, use &lt;a href=&quot;QSettings.html#setValue(java.lang.String, java.lang.Object)&quot;&gt;&lt;tt&gt;setValue&lt;/tt&gt;&lt;/a&gt;. For example:&lt;/p&gt;
&lt;pre&gt;        settings.setValue(&amp;quot;editor/wrapMargin&amp;quot;, 68);&lt;/pre&gt;
&lt;p&gt;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 &lt;a href=&quot;QSettings.html#sync()&quot;&gt;&lt;tt&gt;sync&lt;/tt&gt;&lt;/a&gt; to commit your changes.)&lt;/p&gt;
&lt;p&gt;You can get a setting's value back using &lt;a href=&quot;QSettings.html#value(java.lang.String, java.lang.Object)&quot;&gt;&lt;tt&gt;value&lt;/tt&gt;&lt;/a&gt;:&lt;/p&gt;
&lt;pre&gt;        int margin = settings.value(&amp;quot;editor/wrapMargin&amp;quot;).toInt();&lt;/pre&gt;
&lt;p&gt;If there is no setting with the specified name, &lt;a href=&quot;QSettings.html#QSettings(com.trolltech.qt.core.QSettings.Scope, java.lang.String, java.lang.String, com.trolltech.qt.core.QObject)&quot;&gt;&lt;tt&gt;QSettings&lt;/tt&gt;&lt;/a&gt; returns a null &lt;a href=&quot;%2E%2E/porting4.html#qvariant&quot;&gt;&lt;tt&gt;QVariant&lt;/tt&gt;&lt;/a&gt; (which can be converted to the integer 0). You can specify another default value by passing a second argument to &lt;a href=&quot;QSettings.html#value(java.lang.String, java.lang.Object)&quot;&gt;&lt;tt&gt;value&lt;/tt&gt;&lt;/a&gt;:&lt;/p&gt;
&lt;pre&gt;        int margin = settings.value(&amp;quot;editor/wrapMargin&amp;quot;, 80).toInt();&lt;/pre&gt;
&lt;p&gt;To test whether a given key exists, call &lt;a href=&quot;QSettings.html#contains(java.lang.String)&quot;&gt;&lt;tt&gt;contains&lt;/tt&gt;&lt;/a&gt;. To remove the setting associated with a key, call &lt;a href=&quot;QSettings.html#remove(java.lang.String)&quot;&gt;&lt;tt&gt;remove&lt;/tt&gt;&lt;/a&gt;. To obtain the list of all keys, call &lt;a href=&quot;QSettings.html#allKeys()&quot;&gt;&lt;tt&gt;allKeys&lt;/tt&gt;&lt;/a&gt;. To remove all keys, call &lt;a href=&quot;QSettings.html#clear()&quot;&gt;&lt;tt&gt;clear&lt;/tt&gt;&lt;/a&gt;.&lt;/p&gt;
&lt;a name=&quot;qvariant-and-gui-types&quot;&gt;&lt;/a&gt;
&lt;h3&gt;QVariant and GUI Types&lt;/h3&gt;
&lt;p&gt;Because &lt;a href=&quot;%2E%2E/porting4.html#qvariant&quot;&gt;&lt;tt&gt;QVariant&lt;/tt&gt;&lt;/a&gt; is part of the &lt;tt&gt;QtCore&lt;/tt&gt; library, it cannot provide conversion functions to data types such as &lt;a href=&quot;%2E%2E/gui/QColor.html&quot;&gt;&lt;tt&gt;QColor&lt;/tt&gt;&lt;/a&gt;, &lt;a href=&quot;%2E%2E/gui/QImage.html&quot;&gt;&lt;tt&gt;QImage&lt;/tt&gt;&lt;/a&gt;, and &lt;a href=&quot;%2E%2E/gui/QPixmap.html&quot;&gt;&lt;tt&gt;QPixmap&lt;/tt&gt;&lt;/a&gt;, which are part of &lt;tt&gt;QtGui&lt;/tt&gt;. In other words, there is no &lt;tt&gt;toColor()&lt;/tt&gt;, &lt;tt&gt;toImage()&lt;/tt&gt;, or &lt;tt&gt;toPixmap()&lt;/tt&gt; functions in &lt;a href=&quot;%2E%2E/porting4.html#qvariant&quot;&gt;&lt;tt&gt;QVariant&lt;/tt&gt;&lt;/a&gt;.&lt;/p&gt;
&lt;p&gt;Instead, you can use the QVariant::value() or the qVariantValue() template function. For example:&lt;/p&gt;
&lt;pre&gt;    QSettings settings(&amp;quot;MySoft&amp;quot;, &amp;quot;Star Runner&amp;quot;);
    QColor color = settings.value(&amp;quot;DataPump/bgcolor&amp;quot;).value&amp;lt;QColor&amp;gt;();&lt;/pre&gt;
&lt;p&gt;The inverse conversion (e.g&amp;#x2e;, from &lt;a href=&quot;%2E%2E/gui/QColor.html&quot;&gt;&lt;tt&gt;QColor&lt;/tt&gt;&lt;/a&gt; to &lt;a href=&quot;%2E%2E/porting4.html#qvariant&quot;&gt;&lt;tt&gt;QVariant&lt;/tt&gt;&lt;/a&gt;) is automatic for all data types supported by &lt;a href=&quot;%2E%2E/porting4.html#qvariant&quot;&gt;&lt;tt&gt;QVariant&lt;/tt&gt;&lt;/a&gt;, including GUI-related types:&lt;/p&gt;
&lt;pre&gt;    QSettings settings(&amp;quot;MySoft&amp;quot;, &amp;quot;Star Runner&amp;quot;);
    QColor color = palette().background().color();
    settings.setValue(&amp;quot;DataPump/bgcolor&amp;quot;, color);&lt;/pre&gt;
&lt;p&gt;Custom types registered using qRegisterMetaType() and qRegisterMetaTypeStreamOperators() can be stored using &lt;a href=&quot;QSettings.html#QSettings(com.trolltech.qt.core.QSettings.Scope, java.lang.String, java.lang.String, com.trolltech.qt.core.QObject)&quot;&gt;&lt;tt&gt;QSettings&lt;/tt&gt;&lt;/a&gt;.&lt;/p&gt;
&lt;a name=&quot;key-syntax&quot;&gt;&lt;/a&gt;
&lt;h3&gt;Key Syntax&lt;/h3&gt;
&lt;p&gt;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 two simple rules:&lt;/p&gt;
&lt;ol type=&quot;1&quot;&gt;
&lt;li&gt;Always refer to the same key using the same case. For example, if you refer to a key as &amp;quot;text fonts&amp;quot; in one place in your code, don't refer to it as &amp;quot;Text Fonts&amp;quot; somewhere else.&lt;/li&gt;
&lt;li&gt;Avoid key names that are identical except for the case. For example, if you have a key called &amp;quot;&lt;a href=&quot;%2E%2E/designer-getting-started.html#mainwindow&quot;&gt;&lt;tt&gt;MainWindow&lt;/tt&gt;&lt;/a&gt;&amp;quot;, don't try to save another key as &amp;quot;mainwindow&amp;quot;.&lt;/li&gt;
&lt;li&gt;Do not use slashes ('/' and '\') in key names; the backslash character is used to separate sub keys (see below). On windows '\' are converted by &lt;a href=&quot;QSettings.html#QSettings(com.trolltech.qt.core.QSettings.Scope, java.lang.String, java.lang.String, com.trolltech.qt.core.QObject)&quot;&gt;&lt;tt&gt;QSettings&lt;/tt&gt;&lt;/a&gt; to '/', which makes them identical.&lt;/li&gt;
&lt;/ol&gt;
&lt;p&gt;You can form hierarchical keys using the '/' character as a separator, similar to Unix file paths. For example:&lt;/p&gt;
&lt;pre&gt;        settings.setValue(&amp;quot;mainwindow/size&amp;quot;, win-&amp;gt;size());
        settings.setValue(&amp;quot;mainwindow/fullScreen&amp;quot;, win-&amp;gt;isFullScreen());
        settings.setValue(&amp;quot;outputpanel/visible&amp;quot;, panel-&amp;gt;isVisible());&lt;/pre&gt;
&lt;p&gt;If you want to save or restore many settings with the same prefix, you can specify the prefix using &lt;a href=&quot;QSettings.html#beginGroup(java.lang.String)&quot;&gt;&lt;tt&gt;beginGroup&lt;/tt&gt;&lt;/a&gt; and call &lt;a href=&quot;QSettings.html#endGroup()&quot;&gt;&lt;tt&gt;endGroup&lt;/tt&gt;&lt;/a&gt; at the end. Here's the same example again, but this time using the group mechanism:&lt;/p&gt;
&lt;pre&gt;        settings.beginGroup(&amp;quot;mainwindow&amp;quot;);
        settings.setValue(&amp;quot;size&amp;quot;, win-&amp;gt;size());
        settings.setValue(&amp;quot;fullScreen&amp;quot;, win-&amp;gt;isFullScreen());
        settings.endGroup();

        settings.beginGroup(&amp;quot;outputpanel&amp;quot;);
        settings.setValue(&amp;quot;visible&amp;quot;, panel-&amp;gt;isVisible());
        settings.endGroup();&lt;/pre&gt;
&lt;p&gt;If a group is set using &lt;a href=&quot;QSettings.html#beginGroup(java.lang.String)&quot;&gt;&lt;tt&gt;beginGroup&lt;/tt&gt;&lt;/a&gt;, the behavior of most functions changes consequently. Groups can be set recursively.&lt;/p&gt;
&lt;p&gt;In addition to groups, &lt;a href=&quot;QSettings.html#QSettings(com.trolltech.qt.core.QSettings.Scope, java.lang.String, java.lang.String, com.trolltech.qt.core.QObject)&quot;&gt;&lt;tt&gt;QSettings&lt;/tt&gt;&lt;/a&gt; also supports an &amp;quot;array&amp;quot; concept. See &lt;a href=&quot;QSettings.html#beginReadArray(java.lang.String)&quot;&gt;&lt;tt&gt;beginReadArray&lt;/tt&gt;&lt;/a&gt; and &lt;a href=&quot;QSettings.html#beginWriteArray(java.lang.String, int)&quot;&gt;&lt;tt&gt;beginWriteArray&lt;/tt&gt;&lt;/a&gt; for details.&lt;/p&gt;
&lt;a name=&quot;fallback-mechanism&quot;&gt;&lt;/a&gt;
&lt;h3&gt;Fallback Mechanism&lt;/h3&gt;
&lt;p&gt;Let's assume that you have created a &lt;a href=&quot;QSettings.html#QSettings(com.trolltech.qt.core.QSettings.Scope, java.lang.String, java.lang.String, com.trolltech.qt.core.QObject)&quot;&gt;&lt;tt&gt;QSettings&lt;/tt&gt;&lt;/a&gt; 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:&lt;/p&gt;
&lt;ol type=&quot;1&quot;&gt;
&lt;li&gt;a user-specific location for the Star Runner application&lt;/li&gt;
&lt;li&gt;a user-specific location for all applications by MySoft&lt;/li&gt;
&lt;li&gt;a system-wide location for the Star Runner application&lt;/li&gt;
&lt;li&gt;a system-wide location for all applications by MySoft&lt;/li&gt;
&lt;/ol&gt;
&lt;p&gt;(See &lt;a href=&quot;QSettings.html#platform-specific-notes&quot;&gt;Platform-Specific Notes&lt;/tt&gt;&lt;/a&gt; below for information on what these locations are on the different platforms supported by Qt.)&lt;/p&gt;
&lt;p&gt;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 &lt;a href=&quot;QSettings.html#setFallbacksEnabled(boolean)&quot;&gt;&lt;tt&gt;setFallbacksEnabled&lt;/tt&gt;&lt;/a&gt;(false).&lt;/p&gt;
&lt;p&gt;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 QSettings::SystemScope (as opposed to QSettings::UserScope, the default).&lt;/p&gt;
&lt;p&gt;Let's see with an example:&lt;/p&gt;
&lt;pre&gt;        QSettings obj1(&amp;quot;MySoft&amp;quot;, &amp;quot;Star Runner&amp;quot;);
        QSettings obj2(&amp;quot;MySoft&amp;quot;);
        QSettings obj3(QSettings::SystemScope, &amp;quot;MySoft&amp;quot;, &amp;quot;Star Runner&amp;quot;);
        QSettings obj4(QSettings::SystemScope, &amp;quot;MySoft&amp;quot;);&lt;/pre&gt;
&lt;p&gt;The table below summarizes which &lt;a href=&quot;QSettings.html#QSettings(com.trolltech.qt.core.QSettings.Scope, java.lang.String, java.lang.String, com.trolltech.qt.core.QObject)&quot;&gt;&lt;tt&gt;QSettings&lt;/tt&gt;&lt;/a&gt; objects access which location. &amp;quot;&lt;b&gt;X&lt;/b&gt;&amp;quot; means that the location is the main location associated to the &lt;a href=&quot;QSettings.html#QSettings(com.trolltech.qt.core.QSettings.Scope, java.lang.String, java.lang.String, com.trolltech.qt.core.QObject)&quot;&gt;&lt;tt&gt;QSettings&lt;/tt&gt;&lt;/a&gt; object and is used both for reading and for writing; &amp;quot;o&amp;quot; means that the location is used as a fallback when reading.&lt;/p&gt;
&lt;p&gt;&lt;table align=&quot;center&quot; cellpadding=&quot;2&quot; cellspacing=&quot;1&quot; border=&quot;0&quot;&gt;
&lt;thead&gt;&lt;tr valign=&quot;top&quot; class=&quot;qt-style&quot;&gt;&lt;th&gt;Locations&lt;/th&gt;&lt;th&gt;&lt;tt&gt;obj1&lt;/tt&gt;&lt;/th&gt;&lt;th&gt;&lt;tt&gt;obj2&lt;/tt&gt;&lt;/th&gt;&lt;th&gt;&lt;tt&gt;obj3&lt;/tt&gt;&lt;/th&gt;&lt;th&gt;&lt;tt&gt;obj4&lt;/tt&gt;&lt;/th&gt;&lt;/tr&gt;&lt;/thead&gt;
&lt;tr valign=&quot;top&quot; class=&quot;odd&quot;&gt;&lt;td&gt;1. User, Application&lt;/td&gt;&lt;td&gt;&lt;b&gt;X&lt;/b&gt;&lt;/td&gt;&lt;td&gt;&lt;/td&gt;&lt;td&gt;&lt;/td&gt;&lt;td&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr valign=&quot;top&quot; class=&quot;even&quot;&gt;&lt;td&gt;2. User, Organization&lt;/td&gt;&lt;td&gt;o&lt;/td&gt;&lt;td&gt;&lt;b&gt;X&lt;/b&gt;&lt;/td&gt;&lt;td&gt;&lt;/td&gt;&lt;td&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr valign=&quot;top&quot; class=&quot;odd&quot;&gt;&lt;td&gt;3. System, Application&lt;/td&gt;&lt;td&gt;o&lt;/td&gt;&lt;td&gt;&lt;/td&gt;&lt;td&gt;&lt;b&gt;X&lt;/b&gt;&lt;/td&gt;&lt;td&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr valign=&quot;top&quot; class=&quot;even&quot;&gt;&lt;td&gt;4. System, Organization&lt;/td&gt;&lt;td&gt;o&lt;/td&gt;&lt;td&gt;o&lt;/td&gt;&lt;td&gt;o&lt;/td&gt;&lt;td&gt;&lt;b&gt;X&lt;/b&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;/table&gt;&lt;/p&gt;
&lt;p&gt;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.&lt;/p&gt;
&lt;p&gt;If you want to use INI files on all platforms instead of the native API, you can pass QSettings::IniFormat as the first argument to the &lt;a href=&quot;QSettings.html#QSettings(com.trolltech.qt.core.QSettings.Scope, java.lang.String, java.lang.String, com.trolltech.qt.core.QObject)&quot;&gt;&lt;tt&gt;QSettings&lt;/tt&gt;&lt;/a&gt; constructor, followed by the scope, the organization name, and the application name:&lt;/p&gt;
&lt;pre&gt;        QSettings settings(QSettings::IniFormat, QSettings::UserScope,
                           &amp;quot;MySoft&amp;quot;, &amp;quot;Star Runner&amp;quot;);&lt;/pre&gt;
&lt;p&gt;The Settings Editor&lt;/tt&gt; example lets you experiment with different settings location and with fallbacks turned on or off.&lt;/p&gt;
&lt;a name=&quot;restoring-the-state-of-a-gui-application&quot;&gt;&lt;/a&gt;
&lt;h3&gt;Restoring the State of a GUI Application&lt;/h3&gt;
&lt;p&gt;&lt;a href=&quot;QSettings.html#QSettings(com.trolltech.qt.core.QSettings.Scope, java.lang.String, java.lang.String, com.trolltech.qt.core.QObject)&quot;&gt;&lt;tt&gt;QSettings&lt;/tt&gt;&lt;/a&gt; is often used to store the state of a GUI application. The following example illustrates how to use we will use &lt;a href=&quot;QSettings.html#QSettings(com.trolltech.qt.core.QSettings.Scope, java.lang.String, java.lang.String, com.trolltech.qt.core.QObject)&quot;&gt;&lt;tt&gt;QSettings&lt;/tt&gt;&lt;/a&gt; to save and restore the geometry of an application's main window.&lt;/p&gt;
&lt;pre&gt;    void MainWindow::writeSettings()
    {
        QSettings settings(&amp;quot;Moose Soft&amp;quot;, &amp;quot;Clipper&amp;quot;);

        settings.beginGroup(&amp;quot;MainWindow&amp;quot;);
        settings.setValue(&amp;quot;size&amp;quot;, size());
        settings.setValue(&amp;quot;pos&amp;quot;, pos());
        settings.endGroup();
    }

    void MainWindow::readSettings()
    {
        QSettings settings(&amp;quot;Moose Soft&amp;quot;, &amp;quot;Clipper&amp;quot;);

        settings.beginGroup(&amp;quot;MainWindow&amp;quot;);
        resize(settings.value(&amp;quot;size&amp;quot;, QSize(400, 400)).toSize());
        move(settings.value(&amp;quot;pos&amp;quot;, QPoint(200, 200)).toPoint());
        settings.endGroup();
    }&lt;/pre&gt;
&lt;p&gt;See &lt;a href=&quot;%2E%2E/geometry.html&quot;&gt;Window Geometry&lt;/tt&gt;&lt;/a&gt; for a discussion on why it is better to call QWidget::resize() and QWidget::move() rather than QWidget::setGeometry() to restore a window's geometry.&lt;/p&gt;
&lt;p&gt;The &lt;tt&gt;readSettings()&lt;/tt&gt; and &lt;tt&gt;writeSettings()&lt;/tt&gt; functions must be called from the main window's constructor and close event handler as follows:&lt;/p&gt;
&lt;pre&gt;    MainWindow::MainWindow()
    {
        ...
        readSettings();
    }

    void MainWindow::closeEvent(QCloseEvent *event)
    {
        if (userReallyWantsToQuit()) {
            writeSettings();
            event-&amp;gt;accept();
        } else {
            event-&amp;gt;ignore();
        }
    }&lt;/pre&gt;
&lt;p&gt;See the Application&lt;/tt&gt; example for a self-contained example that uses &lt;a href=&quot;QSettings.html#QSettings(com.trolltech.qt.core.QSettings.Scope, java.lang.String, java.lang.String, com.trolltech.qt.core.QObject)&quot;&gt;&lt;tt&gt;QSettings&lt;/tt&gt;&lt;/a&gt;.&lt;/p&gt;
&lt;a name=&quot;accessing-settings-from-multiple-threads-or-processes-simultaneously&quot;&gt;&lt;/a&gt;
&lt;h3&gt;Accessing Settings from Multiple Threads or Processes Simultaneously&lt;/h3&gt;
&lt;p&gt;&lt;a href=&quot;QSettings.html#QSettings(com.trolltech.qt.core.QSettings.Scope, java.lang.String, java.lang.String, com.trolltech.qt.core.QObject)&quot;&gt;&lt;tt&gt;QSettings&lt;/tt&gt;&lt;/a&gt; is &lt;a href=&quot;%2E%2E/threads.html#reentrant&quot;&gt;reentrant&lt;/tt&gt;&lt;/a&gt;. This means that you can use distinct &lt;a href=&quot;QSettings.html#QSettings(com.trolltech.qt.core.QSettings.Scope, java.lang.String, java.lang.String, com.trolltech.qt.core.QObject)&quot;&gt;&lt;tt&gt;QSettings&lt;/tt&gt;&lt;/a&gt; object in different threads simultaneously. This guarantee stands even when the &lt;a href=&quot;QSettings.html#QSettings(com.trolltech.qt.core.QSettings.Scope, java.lang.String, java.lang.String, com.trolltech.qt.core.QObject)&quot;&gt;&lt;tt&gt;QSettings&lt;/tt&gt;&lt;/a&gt; objects refer to the same files on disk (or to the same entries in the system registry). If a setting is modified through one &lt;a href=&quot;QSettings.html#QSettings(com.trolltech.qt.core.QSettings.Scope, java.lang.String, java.lang.String, com.trolltech.qt.core.QObject)&quot;&gt;&lt;tt&gt;QSettings&lt;/tt&gt;&lt;/a&gt; object, the change will immediately be visible in any other &lt;a href=&quot;QSettings.html#QSettings(com.trolltech.qt.core.QSettings.Scope, java.lang.String, java.lang.String, com.trolltech.qt.core.QObject)&quot;&gt;&lt;tt&gt;QSettings&lt;/tt&gt;&lt;/a&gt; objects that operate on the same location and that live in the same process.&lt;/p&gt;
&lt;p&gt;&lt;a href=&quot;QSettings.html#QSettings(com.trolltech.qt.core.QSettings.Scope, java.lang.String, java.lang.String, com.trolltech.qt.core.QObject)&quot;&gt;&lt;tt&gt;QSettings&lt;/tt&gt;&lt;/a&gt; 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. Changes performed by another process aren't visible in the current process until &lt;a href=&quot;QSettings.html#sync()&quot;&gt;&lt;tt&gt;sync&lt;/tt&gt;&lt;/a&gt; is called.&lt;/p&gt;
&lt;a name=&quot;platform-specific-notes&quot;&gt;&lt;/a&gt;
&lt;h3&gt;Platform-Specific Notes&lt;/h3&gt;
&lt;a name=&quot;locations-where-application-settings-are-stored&quot;&gt;&lt;/a&gt;
&lt;h4&gt;Locations Where Application Settings Are Stored&lt;/h4&gt;
&lt;p&gt;As mentioned in the &lt;a href=&quot;QSettings.html#fallback-mechanism&quot;&gt;Fallback Mechanism&lt;/tt&gt;&lt;/a&gt; section, &lt;a href=&quot;QSettings.html#QSettings(com.trolltech.qt.core.QSettings.Scope, java.lang.String, java.lang.String, com.trolltech.qt.core.QObject)&quot;&gt;&lt;tt&gt;QSettings&lt;/tt&gt;&lt;/a&gt; stores settings for an application in up to four locations, depending on whether the settings are user-specific or system-wide and whether the 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.&lt;/p&gt;
&lt;p&gt;On Unix systems, if the file format is &lt;a href=&quot;QSettings.html#Format-enum&quot;&gt;&lt;tt&gt;NativeFormat&lt;/tt&gt;&lt;/a&gt;, the following files are used by default:&lt;/p&gt;
&lt;ol type=&quot;1&quot;&gt;
&lt;li&gt;&lt;tt&gt;$HOME/.config/MySoft/Star Runner.conf&lt;/tt&gt;&lt;/li&gt;
&lt;li&gt;&lt;tt&gt;$HOME/.config/MySoft.conf&lt;/tt&gt;&lt;/li&gt;
&lt;li&gt;&lt;tt&gt;/etc/xdg/MySoft/Star Runner.conf&lt;/tt&gt;&lt;/li&gt;
&lt;li&gt;&lt;tt&gt;/etc/xdg/MySoft.conf&lt;/tt&gt;&lt;/li&gt;
&lt;/ol&gt;
&lt;p&gt;On Mac OS X versions 10.2 and 10.3, these files are used by default:&lt;/p&gt;
&lt;ol type=&quot;1&quot;&gt;
&lt;li&gt;&lt;tt&gt;$HOME/Library/Preferences/com.MySoft.Star Runner.plist&lt;/tt&gt;&lt;/li&gt;
&lt;li&gt;&lt;tt&gt;$HOME/Library/Preferences/com.MySoft.plist&lt;/tt&gt;&lt;/li&gt;
&lt;li&gt;&lt;tt&gt;/Library/Preferences/com.MySoft.Star Runner.plist&lt;/tt&gt;&lt;/li&gt;
&lt;li&gt;&lt;tt&gt;/Library/Preferences/com.MySoft.plist&lt;/tt&gt;&lt;/li&gt;
&lt;/ol&gt;
&lt;p&gt;On Windows, &lt;a href=&quot;QSettings.html#Format-enum&quot;&gt;&lt;tt&gt;NativeFormat&lt;/tt&gt;&lt;/a&gt; settings are stored in the following registry paths:&lt;/p&gt;
&lt;ol type=&quot;1&quot;&gt;
&lt;li&gt;&lt;tt&gt;HKEY_CURRENT_USER\Software\MySoft\Star Runner&lt;/tt&gt;&lt;/li&gt;
&lt;li&gt;&lt;tt&gt;HKEY_CURRENT_USER\Software\MySoft&lt;/tt&gt;&lt;/li&gt;
&lt;li&gt;&lt;tt&gt;HKEY_LOCAL_MACHINE\Software\MySoft\Star Runner&lt;/tt&gt;&lt;/li&gt;
&lt;li&gt;&lt;tt&gt;HKEY_LOCAL_MACHINE\Software\MySoft&lt;/tt&gt;&lt;/li&gt;
&lt;/ol&gt;
&lt;p&gt;If the file format is &lt;a href=&quot;QSettings.html#Format-enum&quot;&gt;&lt;tt&gt;IniFormat&lt;/tt&gt;&lt;/a&gt;, the following files are used on Unix and Mac OS X:&lt;/p&gt;
&lt;ol type=&quot;1&quot;&gt;
&lt;li&gt;&lt;tt&gt;$HOME/.config/MySoft/Star Runner.ini&lt;/tt&gt;&lt;/li&gt;
&lt;li&gt;&lt;tt&gt;$HOME/.config/MySoft.ini&lt;/tt&gt;&lt;/li&gt;
&lt;li&gt;&lt;tt&gt;/etc/xdg/MySoft/Star Runner.ini&lt;/tt&gt;&lt;/li&gt;
&lt;li&gt;&lt;tt&gt;/etc/xdg/MySoft.ini&lt;/tt&gt;&lt;/li&gt;
&lt;/ol&gt;
&lt;p&gt;On Windows, the following files are used:&lt;/p&gt;
&lt;ol type=&quot;1&quot;&gt;
&lt;li&gt;&lt;tt&gt;%APPDATA%\MySoft\Star Runner.ini&lt;/tt&gt;&lt;/li&gt;
&lt;li&gt;&lt;tt&gt;%APPDATA%\MySoft.ini&lt;/tt&gt;&lt;/li&gt;
&lt;li&gt;&lt;tt&gt;%COMMON_APPDATA%\MySoft\Star Runner.ini&lt;/tt&gt;&lt;/li&gt;
&lt;li&gt;&lt;tt&gt;%COMMON_APPDATA%\MySoft.ini&lt;/tt&gt;&lt;/li&gt;
&lt;/ol&gt;
&lt;p&gt;The &lt;tt&gt;%APPDATA%&lt;/tt&gt; path is usually &lt;tt&gt;C:\Documents and Settings\&lt;i&gt;User Name&lt;/i&gt;\Application Data&lt;/tt&gt;; the &lt;tt&gt;%COMMON_APPDATA%&lt;/tt&gt; path is usually &lt;tt&gt;C:\Documents and Settings\All Users\Application Data&lt;/tt&gt;.&lt;/p&gt;
&lt;p&gt;The paths for the &lt;tt&gt;.ini&lt;/tt&gt; and &lt;tt&gt;.conf&lt;/tt&gt; files can be changed using &lt;a href=&quot;QSettings.html#setPath(com.trolltech.qt.core.QSettings.Format, com.trolltech.qt.core.QSettings.Scope, java.lang.String)&quot;&gt;&lt;tt&gt;setPath&lt;/tt&gt;&lt;/a&gt;. On Unix and Mac OS X, the user can override them by by setting the &lt;tt&gt;XDG_CONFIG_HOME&lt;/tt&gt; environment variable; see &lt;a href=&quot;QSettings.html#setPath(com.trolltech.qt.core.QSettings.Format, com.trolltech.qt.core.QSettings.Scope, java.lang.String)&quot;&gt;&lt;tt&gt;setPath&lt;/tt&gt;&lt;/a&gt; for details.&lt;/p&gt;
&lt;a name=&quot;accessing-ini-and-plist-files-directly&quot;&gt;&lt;/a&gt;
&lt;h4&gt;Accessing INI and .plist Files Directly&lt;/h4&gt;
&lt;p&gt;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 &lt;a href=&quot;QSettings.html#QSettings(com.trolltech.qt.core.QSettings.Scope, java.lang.String, java.lang.String, com.trolltech.qt.core.QObject)&quot;&gt;&lt;tt&gt;QSettings&lt;/tt&gt;&lt;/a&gt; constructor that takes a file name as first argument and pass QSettings::IniFormat as second argument. For example:&lt;/p&gt;
&lt;pre&gt;    QSettings settings(&amp;quot;/home/petra/misc/myapp.ini&amp;quot;,
                       QSettings::IniFormat);&lt;/pre&gt;
&lt;p&gt;You can then use the &lt;a href=&quot;QSettings.html#QSettings(com.trolltech.qt.core.QSettings.Scope, java.lang.String, java.lang.String, com.trolltech.qt.core.QObject)&quot;&gt;&lt;tt&gt;QSettings&lt;/tt&gt;&lt;/a&gt; object to read and write settings in the file.&lt;/p&gt;
&lt;p&gt;On Mac OS X, you can access XML-based &lt;tt&gt;.plist&lt;/tt&gt; files by passing QSettings::NativeFormat as second argument. For example:&lt;/p&gt;
&lt;pre&gt;    QSettings settings(&amp;quot;/Users/petra/misc/myapp.plist&amp;quot;,
                       QSettings::NativeFormat);&lt;/pre&gt;
&lt;a name=&quot;accessing-the-windows-registry-directly&quot;&gt;&lt;/a&gt;
&lt;h4&gt;Accessing the Windows Registry Directly&lt;/h4&gt;
&lt;p&gt;On Windows, &lt;a href=&quot;QSettings.html#QSettings(com.trolltech.qt.core.QSettings.Scope, java.lang.String, java.lang.String, com.trolltech.qt.core.QObject)&quot;&gt;&lt;tt&gt;QSettings&lt;/tt&gt;&lt;/a&gt; also lets you access arbitrary entries in the system registry. This is done by constructing a &lt;a href=&quot;QSettings.html#QSettings(com.trolltech.qt.core.QSettings.Scope, java.lang.String, java.lang.String, com.trolltech.qt.core.QObject)&quot;&gt;&lt;tt&gt;QSettings&lt;/tt&gt;&lt;/a&gt; object with a path in the registry and QSettings::NativeFormat. For example:&lt;/p&gt;
&lt;pre&gt;    QSettings settings(&amp;quot;HKEY_CURRENT_USER\\Software\\Microsoft\\Office&amp;quot;,
                       QSettings::NativeFormat);&lt;/pre&gt;
&lt;p&gt;All the registry entries that appear under the specified path can be read or written through the &lt;a href=&quot;QSettings.html#QSettings(com.trolltech.qt.core.QSettings.Scope, java.lang.String, java.lang.String, com.trolltech.qt.core.QObject)&quot;&gt;&lt;tt&gt;QSettings&lt;/tt&gt;&lt;/a&gt; object as usual (using forward slashes instead of backslashes). For example:&lt;/p&gt;
&lt;pre&gt;    settings.setValue(&amp;quot;11.0/Outlook/Security/DontTrustInstalledFiles&amp;quot;, 0);&lt;/pre&gt;
&lt;p&gt;Note that the backslash character is, as mentioned, used by &lt;a href=&quot;QSettings.html#QSettings(com.trolltech.qt.core.QSettings.Scope, java.lang.String, java.lang.String, com.trolltech.qt.core.QObject)&quot;&gt;&lt;tt&gt;QSettings&lt;/tt&gt;&lt;/a&gt; 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.&lt;/p&gt;
&lt;a name=&quot;accessing-common-registry-settings-on-windows&quot;&gt;&lt;/a&gt;
&lt;h4&gt;Accessing Common Registry Settings on Windows&lt;/h4&gt;
&lt;p&gt;On windows, it is possible for a key to have both a value and subkeys. Its default value is accessed by using &amp;quot;Default&amp;quot; or &amp;quot;.&amp;quot; in place of a subkey:&lt;/p&gt;
&lt;pre&gt;    settings.setValue(&amp;quot;HKEY_CURRENT_USER\\MySoft\\Star Runner\\Galaxy&amp;quot;, &amp;quot;Milkyway&amp;quot;);
    settings.setValue(&amp;quot;HKEY_CURRENT_USER\\MySoft\\Star Runner\\Galaxy\\Sun&amp;quot;, &amp;quot;OurStar&amp;quot;);
    settings.value(&amp;quot;HKEY_CURRENT_USER\\MySoft\\Star Runner\\Galaxy\\Default&amp;quot;); &lt;span class=&quot;comment&quot;&gt;//&lt;/span&gt; returns &amp;quot;Milkyway&amp;quot;&lt;/pre&gt;
&lt;p&gt;On other platforms than windows, &amp;quot;Default&amp;quot; and &amp;quot;.&amp;quot; would be treated as regular subkeys.&lt;/p&gt;
&lt;a name=&quot;platform-limitations&quot;&gt;&lt;/a&gt;
&lt;h4&gt;Platform Limitations&lt;/h4&gt;
&lt;p&gt;While &lt;a href=&quot;QSettings.html#QSettings(com.trolltech.qt.core.QSettings.Scope, java.lang.String, java.lang.String, com.trolltech.qt.core.QObject)&quot;&gt;&lt;tt&gt;QSettings&lt;/tt&gt;&lt;/a&gt; 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:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;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 &lt;a href=&quot;QSettings.html#Format-enum&quot;&gt;&lt;tt&gt;IniFormat&lt;/tt&gt;&lt;/a&gt; instead of the &lt;a href=&quot;QSettings.html#Format-enum&quot;&gt;&lt;tt&gt;NativeFormat&lt;/tt&gt;&lt;/a&gt;.&lt;/li&gt;
&lt;li&gt;On Mac OS X, &lt;a href=&quot;QSettings.html#allKeys()&quot;&gt;&lt;tt&gt;allKeys&lt;/tt&gt;&lt;/a&gt; will return some extra keys for global settings that apply to all applications. These keys can be read using &lt;a href=&quot;QSettings.html#value(java.lang.String, java.lang.Object)&quot;&gt;&lt;tt&gt;value&lt;/tt&gt;&lt;/a&gt; but cannot be changed, only shadowed. Calling &lt;a href=&quot;QSettings.html#setFallbacksEnabled(boolean)&quot;&gt;&lt;tt&gt;setFallbacksEnabled&lt;/tt&gt;&lt;/a&gt;(false) will hide these global settings.&lt;/li&gt;
&lt;li&gt;On Mac OS X, the CFPreferences API used by &lt;a href=&quot;QSettings.html#QSettings(com.trolltech.qt.core.QSettings.Scope, java.lang.String, java.lang.String, com.trolltech.qt.core.QObject)&quot;&gt;&lt;tt&gt;QSettings&lt;/tt&gt;&lt;/a&gt; expects Internet domain names rather than organization names. To provide a uniform API, &lt;a href=&quot;QSettings.html#QSettings(com.trolltech.qt.core.QSettings.Scope, java.lang.String, java.lang.String, com.trolltech.qt.core.QObject)&quot;&gt;&lt;tt&gt;QSettings&lt;/tt&gt;&lt;/a&gt; derives a fake domain name from the organization name (unless the organization name already is a domain name, e.g&amp;#x2e; OpenOffice.org). The algorithm appends &amp;quot;.com&amp;quot; to the company name and replaces spaces and other illegal characters with hyphens. If you want to specify a different domain name, call QCoreApplication::setOrganizationDomain(), QCoreApplication::setOrganizationName(), and QCoreApplication::setApplicationName() in your &lt;tt&gt;main()&lt;/tt&gt; function and then use the default &lt;a href=&quot;QSettings.html#QSettings(com.trolltech.qt.core.QSettings.Scope, java.lang.String, java.lang.String, com.trolltech.qt.core.QObject)&quot;&gt;&lt;tt&gt;QSettings&lt;/tt&gt;&lt;/a&gt; constructor. Another solution is to use preprocessor directives, for example:&lt;pre&gt;    #ifdef Q_WS_MAC
        QSettings settings(&amp;quot;grenoullelogique.fr&amp;quot;, &amp;quot;Squash&amp;quot;);
    #else
        QSettings settings(&amp;quot;Grenoulle Logique&amp;quot;, &amp;quot;Squash&amp;quot;);
    #endif&lt;/pre&gt;
&lt;/li&gt;
&lt;/ul&gt;

@see &lt;a href=&quot;%2E%2E/porting4.html#qvariant&quot;&gt;&lt;tt&gt;QVariant&lt;/tt&gt;&lt;/a&gt;
@see &lt;a href=&quot;%2E%2E/gui/QSessionManager.html&quot;&gt;&lt;tt&gt;QSessionManager&lt;/tt&gt;&lt;/a&gt;
@see Settings Editor Example&lt;/tt&gt;
@see &lt;a href=&quot;%2E%2E/qtjambi-application.html&quot;&gt;Application Example&lt;/tt&gt;&lt;/a&gt; */">
    <method name="public QSettings(java.lang.String organization, java.lang.String application, com.trolltech.qt.core.QObject parent)" doc="/**
&lt;p&gt;Constructs a &lt;a href=&quot;QSettings.html#QSettings(com.trolltech.qt.core.QSettings.Scope, java.lang.String, java.lang.String, com.trolltech.qt.core.QObject)&quot;&gt;&lt;tt&gt;QSettings&lt;/tt&gt;&lt;/a&gt; object for accessing settings of the application called &lt;tt&gt;application&lt;/tt&gt; from the organization called &lt;tt&gt;organization&lt;/tt&gt;, and with parent &lt;tt&gt;parent&lt;/tt&gt;.&lt;/p&gt;
&lt;p&gt;Example:&lt;/p&gt;
&lt;pre&gt;    QSettings settings(&amp;quot;Moose Tech&amp;quot;, &amp;quot;Facturo-Pro&amp;quot;);&lt;/pre&gt;
&lt;p&gt;The scope is QSettings::UserScope and the format is QSettings::NativeFormat.&lt;/p&gt;

@see &lt;a href=&quot;QSettings.html#fallback-mechanism&quot;&gt;Fallback Mechanism&lt;/tt&gt;&lt;/a&gt; */"/>
    <method name="public QSettings(java.lang.String organization, java.lang.String application)" doc="/**
&lt;p&gt;Equivalent to &lt;a href=&quot;QSettings.html#QSettings(com.trolltech.qt.core.QSettings.Scope, java.lang.String, java.lang.String, com.trolltech.qt.core.QObject)&quot;&gt;&lt;tt&gt;QSettings&lt;/tt&gt;&lt;/a&gt;(&lt;tt&gt;organization&lt;/tt&gt;, &lt;tt&gt;application&lt;/tt&gt;, 0). */"/>
    <method name="public QSettings(java.lang.String organization)" doc="/**
&lt;p&gt;Equivalent to &lt;a href=&quot;QSettings.html#QSettings(com.trolltech.qt.core.QSettings.Scope, java.lang.String, java.lang.String, com.trolltech.qt.core.QObject)&quot;&gt;&lt;tt&gt;QSettings&lt;/tt&gt;&lt;/a&gt;(&lt;tt&gt;organization&lt;/tt&gt;, QString(), 0). */"/>
    <method name="public QSettings(com.trolltech.qt.core.QSettings.Format format, com.trolltech.qt.core.QSettings.Scope scope, java.lang.String organization, java.lang.String application, com.trolltech.qt.core.QObject parent)" doc="/**
&lt;p&gt;Constructs a &lt;a href=&quot;QSettings.html#QSettings(com.trolltech.qt.core.QSettings.Scope, java.lang.String, java.lang.String, com.trolltech.qt.core.QObject)&quot;&gt;&lt;tt&gt;QSettings&lt;/tt&gt;&lt;/a&gt; object for accessing settings of the application called &lt;tt&gt;application&lt;/tt&gt; from the organization called &lt;tt&gt;organization&lt;/tt&gt;, and with parent &lt;tt&gt;parent&lt;/tt&gt;.&lt;/p&gt;
&lt;p&gt;If &lt;tt&gt;scope&lt;/tt&gt; is QSettings::UserScope, the &lt;a href=&quot;QSettings.html#QSettings(com.trolltech.qt.core.QSettings.Scope, java.lang.String, java.lang.String, com.trolltech.qt.core.QObject)&quot;&gt;&lt;tt&gt;QSettings&lt;/tt&gt;&lt;/a&gt; object searches user-specific settings first, before it searches system-wide settings as a fallback. If &lt;tt&gt;scope&lt;/tt&gt; is QSettings::SystemScope, the &lt;a href=&quot;QSettings.html#QSettings(com.trolltech.qt.core.QSettings.Scope, java.lang.String, java.lang.String, com.trolltech.qt.core.QObject)&quot;&gt;&lt;tt&gt;QSettings&lt;/tt&gt;&lt;/a&gt; object ignores user-specific settings and provides access to system-wide settings.&lt;/p&gt;
&lt;p&gt;If &lt;tt&gt;format&lt;/tt&gt; is QSettings::NativeFormat, the native API is used for storing settings. If &lt;tt&gt;format&lt;/tt&gt; is QSettings::IniFormat, the INI format is used.&lt;/p&gt;
&lt;p&gt;If no application name is given, the &lt;a href=&quot;QSettings.html#QSettings(com.trolltech.qt.core.QSettings.Scope, java.lang.String, java.lang.String, com.trolltech.qt.core.QObject)&quot;&gt;&lt;tt&gt;QSettings&lt;/tt&gt;&lt;/a&gt; object will only access the organization-wide &lt;a href=&quot;QSettings.html#fallback-mechanism&quot;&gt;locations&lt;/tt&gt;&lt;/a&gt;.&lt;/p&gt;
 */"/>
    <method name="public QSettings(com.trolltech.qt.core.QSettings.Format format, com.trolltech.qt.core.QSettings.Scope scope, java.lang.String organization, java.lang.String application)" doc="/**
&lt;p&gt;Equivalent to &lt;a href=&quot;QSettings.html#QSettings(com.trolltech.qt.core.QSettings.Scope, java.lang.String, java.lang.String, com.trolltech.qt.core.QObject)&quot;&gt;&lt;tt&gt;QSettings&lt;/tt&gt;&lt;/a&gt;(&lt;tt&gt;format&lt;/tt&gt;, &lt;tt&gt;scope&lt;/tt&gt;, &lt;tt&gt;organization&lt;/tt&gt;, &lt;tt&gt;application&lt;/tt&gt;, 0). */"/>
    <method name="public QSettings(com.trolltech.qt.core.QSettings.Format format, com.trolltech.qt.core.QSettings.Scope scope, java.lang.String organization)" doc="/**
&lt;p&gt;Equivalent to &lt;a href=&quot;QSettings.html#QSettings(com.trolltech.qt.core.QSettings.Scope, java.lang.String, java.lang.String, com.trolltech.qt.core.QObject)&quot;&gt;&lt;tt&gt;QSettings&lt;/tt&gt;&lt;/a&gt;(&lt;tt&gt;format&lt;/tt&gt;, &lt;tt&gt;scope&lt;/tt&gt;, &lt;tt&gt;organization&lt;/tt&gt;, QString(), 0). */"/>
    <method name="public QSettings(com.trolltech.qt.core.QObject parent)" doc="/**
&lt;p&gt;Constructs a &lt;a href=&quot;QSettings.html#QSettings(com.trolltech.qt.core.QSettings.Scope, java.lang.String, java.lang.String, com.trolltech.qt.core.QObject)&quot;&gt;&lt;tt&gt;QSettings&lt;/tt&gt;&lt;/a&gt; object for accessing settings of the application and organization set previously with a call to QCoreApplication::setOrganizationName(), QCoreApplication::setOrganizationDomain(), and QCoreApplication::setApplicationName().&lt;/p&gt;
&lt;p&gt;The scope is QSettings::UserScope and the format is QSettings::NativeFormat.&lt;/p&gt;
&lt;p&gt;The code&lt;/p&gt;
&lt;pre&gt;    QSettings settings(&amp;quot;Moose Soft&amp;quot;, &amp;quot;Facturo-Pro&amp;quot;);&lt;/pre&gt;
&lt;p&gt;is equivalent to&lt;/p&gt;
&lt;pre&gt;    QCoreApplication::setOrganizationName(&amp;quot;Moose Soft&amp;quot;);
    QCoreApplication::setApplicationName(&amp;quot;Facturo-Pro&amp;quot;);
    QSettings settings;&lt;/pre&gt;
&lt;p&gt;If QCoreApplication::setOrganizationName() and QCoreApplication::setApplicationName() has not been previously called, the &lt;a href=&quot;QSettings.html#QSettings(com.trolltech.qt.core.QSettings.Scope, java.lang.String, java.lang.String, com.trolltech.qt.core.QObject)&quot;&gt;&lt;tt&gt;QSettings&lt;/tt&gt;&lt;/a&gt; object will not be able to read or write any settings, and &lt;a href=&quot;QSettings.html#status()&quot;&gt;&lt;tt&gt;status&lt;/tt&gt;&lt;/a&gt; will return &lt;a href=&quot;QSettings.html#Status-enum&quot;&gt;&lt;tt&gt;AccessError&lt;/tt&gt;&lt;/a&gt;.&lt;/p&gt;
&lt;p&gt;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.&lt;/p&gt;

@see &lt;tt&gt;QCoreApplication::setOrganizationName&lt;/tt&gt;
@see &lt;tt&gt;QCoreApplication::setOrganizationDomain&lt;/tt&gt;
@see &lt;tt&gt;QCoreApplication::setApplicationName&lt;/tt&gt; */"/>
    <method name="public QSettings()" doc="/**
&lt;p&gt;Equivalent to &lt;a href=&quot;QSettings.html#QSettings(com.trolltech.qt.core.QSettings.Scope, java.lang.String, java.lang.String, com.trolltech.qt.core.QObject)&quot;&gt;&lt;tt&gt;QSettings&lt;/tt&gt;&lt;/a&gt;(0). */"/>
    <method name="public QSettings(java.lang.String fileName, com.trolltech.qt.core.QSettings.Format format, com.trolltech.qt.core.QObject parent)" doc="/**
&lt;p&gt;Constructs a &lt;a href=&quot;QSettings.html#QSettings(com.trolltech.qt.core.QSettings.Scope, java.lang.String, java.lang.String, com.trolltech.qt.core.QObject)&quot;&gt;&lt;tt&gt;QSettings&lt;/tt&gt;&lt;/a&gt; object for accessing the settings stored in the file called &lt;tt&gt;fileName&lt;/tt&gt;, with parent &lt;tt&gt;parent&lt;/tt&gt;. If the file doesn't already exist, it is created.&lt;/p&gt;
&lt;p&gt;If &lt;tt&gt;format&lt;/tt&gt; is QSettings::NativeFormat, the meaning of &lt;tt&gt;fileName&lt;/tt&gt; depends on the platform. On Unix, &lt;tt&gt;fileName&lt;/tt&gt; is the name of an INI file. On Mac OS X, &lt;tt&gt;fileName&lt;/tt&gt; is the name of a &lt;tt&gt;.plist&lt;/tt&gt; file. On Windows, &lt;tt&gt;fileName&lt;/tt&gt; is a path in the system registry.&lt;/p&gt;
&lt;p&gt;If &lt;tt&gt;format&lt;/tt&gt; is QSettings::IniFormat, &lt;tt&gt;fileName&lt;/tt&gt; is the name of an INI file.&lt;/p&gt;

@see &lt;a href=&quot;QSettings.html#fileName()&quot;&gt;&lt;tt&gt;fileName&lt;/tt&gt;&lt;/a&gt; */"/>
    <method name="public QSettings(java.lang.String fileName, com.trolltech.qt.core.QSettings.Format format)" doc="/**
&lt;p&gt;Equivalent to &lt;a href=&quot;QSettings.html#QSettings(com.trolltech.qt.core.QSettings.Scope, java.lang.String, java.lang.String, com.trolltech.qt.core.QObject)&quot;&gt;&lt;tt&gt;QSettings&lt;/tt&gt;&lt;/a&gt;(&lt;tt&gt;fileName&lt;/tt&gt;, &lt;tt&gt;format&lt;/tt&gt;, 0). */"/>
    <method name="public QSettings(com.trolltech.qt.core.QSettings.Scope scope, java.lang.String organization, java.lang.String application, com.trolltech.qt.core.QObject parent)" doc="/**
&lt;p&gt;Constructs a &lt;a href=&quot;QSettings.html#QSettings(com.trolltech.qt.core.QSettings.Scope, java.lang.String, java.lang.String, com.trolltech.qt.core.QObject)&quot;&gt;&lt;tt&gt;QSettings&lt;/tt&gt;&lt;/a&gt; object for accessing settings of the application called &lt;tt&gt;application&lt;/tt&gt; from the organization called &lt;tt&gt;organization&lt;/tt&gt;, and with parent &lt;tt&gt;parent&lt;/tt&gt;.&lt;/p&gt;
&lt;p&gt;If &lt;tt&gt;scope&lt;/tt&gt; is QSettings::UserScope, the &lt;a href=&quot;QSettings.html#QSettings(com.trolltech.qt.core.QSettings.Scope, java.lang.String, java.lang.String, com.trolltech.qt.core.QObject)&quot;&gt;&lt;tt&gt;QSettings&lt;/tt&gt;&lt;/a&gt; object searches user-specific settings first, before it searches system-wide settings as a fallback. If &lt;tt&gt;scope&lt;/tt&gt; is QSettings::SystemScope, the &lt;a href=&quot;QSettings.html#QSettings(com.trolltech.qt.core.QSettings.Scope, java.lang.String, java.lang.String, com.trolltech.qt.core.QObject)&quot;&gt;&lt;tt&gt;QSettings&lt;/tt&gt;&lt;/a&gt; object ignores user-specific settings and provides access to system-wide settings.&lt;/p&gt;
&lt;p&gt;The storage format is always QSettings::NativeFormat.&lt;/p&gt;
&lt;p&gt;If no application name is given, the &lt;a href=&quot;QSettings.html#QSettings(com.trolltech.qt.core.QSettings.Scope, java.lang.String, java.lang.String, com.trolltech.qt.core.QObject)&quot;&gt;&lt;tt&gt;QSettings&lt;/tt&gt;&lt;/a&gt; object will only access the organization-wide &lt;a href=&quot;QSettings.html#fallback-mechanism&quot;&gt;locations&lt;/tt&gt;&lt;/a&gt;.&lt;/p&gt;
 */"/>
    <method name="public QSettings(com.trolltech.qt.core.QSettings.Scope scope, java.lang.String organization, java.lang.String application)" doc="/**
&lt;p&gt;Equivalent to &lt;a href=&quot;QSettings.html#QSettings(com.trolltech.qt.core.QSettings.Scope, java.lang.String, java.lang.String, com.trolltech.qt.core.QObject)&quot;&gt;&lt;tt&gt;QSettings&lt;/tt&gt;&lt;/a&gt;(&lt;tt&gt;scope&lt;/tt&gt;, &lt;tt&gt;organization&lt;/tt&gt;, &lt;tt&gt;application&lt;/tt&gt;, 0). */"/>
    <method name="public QSettings(com.trolltech.qt.core.QSettings.Scope scope, java.lang.String organization)" doc="/**
&lt;p&gt;Equivalent to &lt;a href=&quot;QSettings.html#QSettings(com.trolltech.qt.core.QSettings.Scope, java.lang.String, java.lang.String, com.trolltech.qt.core.QObject)&quot;&gt;&lt;tt&gt;QSettings&lt;/tt&gt;&lt;/a&gt;(&lt;tt&gt;scope&lt;/tt&gt;, &lt;tt&gt;organization&lt;/tt&gt;, QString(), 0). */"/>
    <method name="public final java.util.List&lt;java.lang.String&gt; allKeys()" doc="/**
&lt;p&gt;Returns a list of all keys, including subkeys, that can be read using the &lt;a href=&quot;QSettings.html#QSettings(com.trolltech.qt.core.QSettings.Scope, java.lang.String, java.lang.String, com.trolltech.qt.core.QObject)&quot;&gt;&lt;tt&gt;QSettings&lt;/tt&gt;&lt;/a&gt; object.&lt;/p&gt;
&lt;p&gt;Example:&lt;/p&gt;
&lt;pre&gt;    QSettings settings;
    settings.setValue(&amp;quot;fridge/color&amp;quot;, Qt::white);
    settings.setValue(&amp;quot;fridge/size&amp;quot;, QSize(32, 96));
    settings.setValue(&amp;quot;sofa&amp;quot;, true);
    settings.setValue(&amp;quot;tv&amp;quot;, false);

    QStringList keys = settings.allKeys();
&lt;span class=&quot;comment&quot;&gt;    //&lt;/span&gt; keys: [&amp;quot;fridge/color&amp;quot;, &amp;quot;fridge/size&amp;quot;, &amp;quot;sofa&amp;quot;, &amp;quot;tv&amp;quot;]&lt;/pre&gt;
&lt;p&gt;If a group is set using &lt;a href=&quot;QSettings.html#beginGroup(java.lang.String)&quot;&gt;&lt;tt&gt;beginGroup&lt;/tt&gt;&lt;/a&gt;, only the keys in the group are returned, without the group prefix:&lt;/p&gt;
&lt;pre&gt;    settings.beginGroup(&amp;quot;fridge&amp;quot;);
    keys = settings.allKeys();
&lt;span class=&quot;comment&quot;&gt;    //&lt;/span&gt; keys: [&amp;quot;color&amp;quot;, &amp;quot;size&amp;quot;]&lt;/pre&gt;

@see &lt;a href=&quot;QSettings.html#childGroups()&quot;&gt;&lt;tt&gt;childGroups&lt;/tt&gt;&lt;/a&gt;
@see &lt;a href=&quot;QSettings.html#childKeys()&quot;&gt;&lt;tt&gt;childKeys&lt;/tt&gt;&lt;/a&gt; */"/>
    <method name="public final void beginGroup(java.lang.String prefix)" doc="/**
&lt;p&gt;Appends &lt;tt&gt;prefix&lt;/tt&gt; to the current group.&lt;/p&gt;
&lt;p&gt;The current group is automatically prepended to all keys specified to &lt;a href=&quot;QSettings.html#QSettings(com.trolltech.qt.core.QSettings.Scope, java.lang.String, java.lang.String, com.trolltech.qt.core.QObject)&quot;&gt;&lt;tt&gt;QSettings&lt;/tt&gt;&lt;/a&gt;. In addition, query functions such as &lt;a href=&quot;QSettings.html#childGroups()&quot;&gt;&lt;tt&gt;childGroups&lt;/tt&gt;&lt;/a&gt;, &lt;a href=&quot;QSettings.html#childKeys()&quot;&gt;&lt;tt&gt;childKeys&lt;/tt&gt;&lt;/a&gt;, and &lt;a href=&quot;QSettings.html#allKeys()&quot;&gt;&lt;tt&gt;allKeys&lt;/tt&gt;&lt;/a&gt; are based on the group. By default, no group is set.&lt;/p&gt;
&lt;p&gt;Groups are useful to avoid typing in the same setting paths over and over. For example:&lt;/p&gt;
&lt;pre&gt;    settings.beginGroup(&amp;quot;mainwindow&amp;quot;);
    settings.setValue(&amp;quot;size&amp;quot;, win-&amp;gt;size());
    settings.setValue(&amp;quot;fullScreen&amp;quot;, win-&amp;gt;isFullScreen());
    settings.endGroup();

    settings.beginGroup(&amp;quot;outputpanel&amp;quot;);
    settings.setValue(&amp;quot;visible&amp;quot;, panel-&amp;gt;isVisible());
    settings.endGroup();&lt;/pre&gt;
&lt;p&gt;This will set the value of three settings:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;&lt;tt&gt;mainwindow/size&lt;/tt&gt;&lt;/li&gt;
&lt;li&gt;&lt;tt&gt;mainwindow/fullScreen&lt;/tt&gt;&lt;/li&gt;
&lt;li&gt;&lt;tt&gt;outputpanel/visible&lt;/tt&gt;&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;Call &lt;a href=&quot;QSettings.html#endGroup()&quot;&gt;&lt;tt&gt;endGroup&lt;/tt&gt;&lt;/a&gt; to reset the current group to what it was before the corresponding &lt;a href=&quot;QSettings.html#beginGroup(java.lang.String)&quot;&gt;&lt;tt&gt;beginGroup&lt;/tt&gt;&lt;/a&gt; call. Groups can be nested.&lt;/p&gt;

@see &lt;a href=&quot;QSettings.html#endGroup()&quot;&gt;&lt;tt&gt;endGroup&lt;/tt&gt;&lt;/a&gt;
@see &lt;a href=&quot;QSettings.html#group()&quot;&gt;&lt;tt&gt;group&lt;/tt&gt;&lt;/a&gt; */"/>
    <method name="public final int beginReadArray(java.lang.String prefix)" doc="/**
&lt;p&gt;Adds &lt;tt&gt;prefix&lt;/tt&gt; to the current group and starts reading from an array. Returns the size of the array.&lt;/p&gt;
&lt;p&gt;Example:&lt;/p&gt;
&lt;pre&gt;    struct Login {
        QString userName;
        QString password;
    };
    QList&amp;lt;Login&amp;gt; logins;
    ...

    QSettings settings;
    int size = settings.beginReadArray(&amp;quot;logins&amp;quot;);
    for (int i = 0; i &amp;lt; size; ++i) {
        settings.setArrayIndex(i);
        Login login;
        login.userName = settings.value(&amp;quot;userName&amp;quot;);
        login.password = settings.value(&amp;quot;password&amp;quot;);
        logins.append(login);
    }
    settings.endArray();&lt;/pre&gt;
&lt;p&gt;Use &lt;a href=&quot;QSettings.html#beginWriteArray(java.lang.String, int)&quot;&gt;&lt;tt&gt;beginWriteArray&lt;/tt&gt;&lt;/a&gt; to write the array in the first place.&lt;/p&gt;

@see &lt;a href=&quot;QSettings.html#beginWriteArray(java.lang.String, int)&quot;&gt;&lt;tt&gt;beginWriteArray&lt;/tt&gt;&lt;/a&gt;
@see &lt;a href=&quot;QSettings.html#endArray()&quot;&gt;&lt;tt&gt;endArray&lt;/tt&gt;&lt;/a&gt;
@see &lt;a href=&quot;QSettings.html#setArrayIndex(int)&quot;&gt;&lt;tt&gt;setArrayIndex&lt;/tt&gt;&lt;/a&gt; */"/>
    <method name="public final void beginWriteArray(java.lang.String prefix, int size)" doc="/**
&lt;p&gt;Adds &lt;tt&gt;prefix&lt;/tt&gt; to the current group and starts writing an array of size &lt;tt&gt;size&lt;/tt&gt;. If &lt;tt&gt;size&lt;/tt&gt; is -1 (the default), it is automatically determined based on the indexes of the entries written.&lt;/p&gt;
&lt;p&gt;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:&lt;/p&gt;
&lt;pre&gt;    struct Login {
        QString userName;
        QString password;
    };
    QList&amp;lt;Login&amp;gt; logins;
    ...

    QSettings settings;
    settings.beginWriteArray(&amp;quot;logins&amp;quot;);
    for (int i = 0; i &amp;lt; logins.size(); ++i) {
        settings.setArrayIndex(i);
        settings.setValue(&amp;quot;userName&amp;quot;, list.at(i).userName);
        settings.setValue(&amp;quot;password&amp;quot;, list.at(i).password);
    }
    settings.endArray();&lt;/pre&gt;
&lt;p&gt;The generated keys will have the form&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;&lt;tt&gt;logins/1/userName&lt;/tt&gt;&lt;/li&gt;
&lt;li&gt;&lt;tt&gt;logins/1/password&lt;/tt&gt;&lt;/li&gt;
&lt;li&gt;&lt;tt&gt;logins/2/userName&lt;/tt&gt;&lt;/li&gt;
&lt;li&gt;&lt;tt&gt;logins/2/password&lt;/tt&gt;&lt;/li&gt;
&lt;li&gt;&lt;tt&gt;logins/3/userName&lt;/tt&gt;&lt;/li&gt;
&lt;li&gt;&lt;tt&gt;logins/3/password&lt;/tt&gt;&lt;/li&gt;
&lt;li&gt;...&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;To read back an array, use &lt;a href=&quot;QSettings.html#beginReadArray(java.lang.String)&quot;&gt;&lt;tt&gt;beginReadArray&lt;/tt&gt;&lt;/a&gt;.&lt;/p&gt;

@see &lt;a href=&quot;QSettings.html#beginReadArray(java.lang.String)&quot;&gt;&lt;tt&gt;beginReadArray&lt;/tt&gt;&lt;/a&gt;
@see &lt;a href=&quot;QSettings.html#endArray()&quot;&gt;&lt;tt&gt;endArray&lt;/tt&gt;&lt;/a&gt;
@see &lt;a href=&quot;QSettings.html#setArrayIndex(int)&quot;&gt;&lt;tt&gt;setArrayIndex&lt;/tt&gt;&lt;/a&gt; */"/>
    <method name="public final void beginWriteArray(java.lang.String prefix)" doc="/**
&lt;p&gt;Equivalent to &lt;a href=&quot;QSettings.html#beginWriteArray(java.lang.String, int)&quot;&gt;&lt;tt&gt;beginWriteArray&lt;/tt&gt;&lt;/a&gt;(&lt;tt&gt;prefix&lt;/tt&gt;, -1). */"/>
    <method name="public final java.util.List&lt;java.lang.String&gt; childGroups()" doc="/**
&lt;p&gt;Returns a list of all key top-level groups that contain keys that can be read using the &lt;a href=&quot;QSettings.html#QSettings(com.trolltech.qt.core.QSettings.Scope, java.lang.String, java.lang.String, com.trolltech.qt.core.QObject)&quot;&gt;&lt;tt&gt;QSettings&lt;/tt&gt;&lt;/a&gt; object.&lt;/p&gt;
&lt;p&gt;Example:&lt;/p&gt;
&lt;pre&gt;    QSettings settings;
    settings.setValue(&amp;quot;fridge/color&amp;quot;, Qt::white);
    settings.setValue(&amp;quot;fridge/size&amp;quot;, QSize(32, 96));
    settings.setValue(&amp;quot;sofa&amp;quot;, true);
    settings.setValue(&amp;quot;tv&amp;quot;, false);

    QStringList groups = settings.childGroups();
&lt;span class=&quot;comment&quot;&gt;    //&lt;/span&gt; group: [&amp;quot;fridge&amp;quot;]&lt;/pre&gt;
&lt;p&gt;If a group is set using &lt;a href=&quot;QSettings.html#beginGroup(java.lang.String)&quot;&gt;&lt;tt&gt;beginGroup&lt;/tt&gt;&lt;/a&gt;, the first-level keys in that group are returned, without the group prefix.&lt;/p&gt;
&lt;pre&gt;    settings.beginGroup(&amp;quot;fridge&amp;quot;);
    groups = settings.childGroups();
&lt;span class=&quot;comment&quot;&gt;    //&lt;/span&gt; groups: []&lt;/pre&gt;
&lt;p&gt;You can navigate through the entire setting hierarchy using &lt;a href=&quot;QSettings.html#childKeys()&quot;&gt;&lt;tt&gt;childKeys&lt;/tt&gt;&lt;/a&gt; and &lt;a href=&quot;QSettings.html#childGroups()&quot;&gt;&lt;tt&gt;childGroups&lt;/tt&gt;&lt;/a&gt; recursively.&lt;/p&gt;

@see &lt;a href=&quot;QSettings.html#childKeys()&quot;&gt;&lt;tt&gt;childKeys&lt;/tt&gt;&lt;/a&gt;
@see &lt;a href=&quot;QSettings.html#allKeys()&quot;&gt;&lt;tt&gt;allKeys&lt;/tt&gt;&lt;/a&gt; */"/>
    <method name="public final java.util.List&lt;java.lang.String&gt; childKeys()" doc="/**
&lt;p&gt;Returns a list of all top-level keys that can be read using the &lt;a href=&quot;QSettings.html#QSettings(com.trolltech.qt.core.QSettings.Scope, java.lang.String, java.lang.String, com.trolltech.qt.core.QObject)&quot;&gt;&lt;tt&gt;QSettings&lt;/tt&gt;&lt;/a&gt; object.&lt;/p&gt;
&lt;p&gt;Example:&lt;/p&gt;
&lt;pre&gt;    QSettings settings;
    settings.setValue(&amp;quot;fridge/color&amp;quot;, Qt::white);
    settings.setValue(&amp;quot;fridge/size&amp;quot;, QSize(32, 96));
    settings.setValue(&amp;quot;sofa&amp;quot;, true);
    settings.setValue(&amp;quot;tv&amp;quot;, false);

    QStringList keys = settings.childKeys();
&lt;span class=&quot;comment&quot;&gt;    //&lt;/span&gt; keys: [&amp;quot;sofa&amp;quot;, &amp;quot;tv&amp;quot;]&lt;/pre&gt;
&lt;p&gt;If a group is set using &lt;a href=&quot;QSettings.html#beginGroup(java.lang.String)&quot;&gt;&lt;tt&gt;beginGroup&lt;/tt&gt;&lt;/a&gt;, the top-level keys in that group are returned, without the group prefix:&lt;/p&gt;
&lt;pre&gt;    settings.beginGroup(&amp;quot;fridge&amp;quot;);
    keys = settings.childKeys();
&lt;span class=&quot;comment&quot;&gt;    //&lt;/span&gt; keys: [&amp;quot;color&amp;quot;, &amp;quot;size&amp;quot;]&lt;/pre&gt;
&lt;p&gt;You can navigate through the entire setting hierarchy using &lt;a href=&quot;QSettings.html#childKeys()&quot;&gt;&lt;tt&gt;childKeys&lt;/tt&gt;&lt;/a&gt; and &lt;a href=&quot;QSettings.html#childGroups()&quot;&gt;&lt;tt&gt;childGroups&lt;/tt&gt;&lt;/a&gt; recursively.&lt;/p&gt;

@see &lt;a href=&quot;QSettings.html#childGroups()&quot;&gt;&lt;tt&gt;childGroups&lt;/tt&gt;&lt;/a&gt;
@see &lt;a href=&quot;QSettings.html#allKeys()&quot;&gt;&lt;tt&gt;allKeys&lt;/tt&gt;&lt;/a&gt; */"/>
    <method name="public final void clear()" doc="/**
&lt;p&gt;Removes all entries in the primary location associated to this &lt;a href=&quot;QSettings.html#QSettings(com.trolltech.qt.core.QSettings.Scope, java.lang.String, java.lang.String, com.trolltech.qt.core.QObject)&quot;&gt;&lt;tt&gt;QSettings&lt;/tt&gt;&lt;/a&gt; object.&lt;/p&gt;
&lt;p&gt;Entries in fallback locations are not removed.&lt;/p&gt;
&lt;p&gt;If you only want to remove the entries in the current &lt;a href=&quot;QSettings.html#group()&quot;&gt;&lt;tt&gt;group&lt;/tt&gt;&lt;/a&gt;, use remove(&amp;quot;&amp;quot;) instead.&lt;/p&gt;

@see &lt;a href=&quot;QSettings.html#remove(java.lang.String)&quot;&gt;&lt;tt&gt;remove&lt;/tt&gt;&lt;/a&gt;
@see &lt;a href=&quot;QSettings.html#setFallbacksEnabled(boolean)&quot;&gt;&lt;tt&gt;setFallbacksEnabled&lt;/tt&gt;&lt;/a&gt; */"/>
    <method name="public final boolean contains(java.lang.String key)" doc="/**
&lt;p&gt;Returns true if there exists a setting called &lt;tt&gt;key&lt;/tt&gt;; returns false otherwise.&lt;/p&gt;
&lt;p&gt;If a group is set using &lt;a href=&quot;QSettings.html#beginGroup(java.lang.String)&quot;&gt;&lt;tt&gt;beginGroup&lt;/tt&gt;&lt;/a&gt;, &lt;tt&gt;key&lt;/tt&gt; is taken to be relative to that group.&lt;/p&gt;

@see &lt;a href=&quot;QSettings.html#value(java.lang.String, java.lang.Object)&quot;&gt;&lt;tt&gt;value&lt;/tt&gt;&lt;/a&gt;
@see &lt;a href=&quot;QSettings.html#setValue(java.lang.String, java.lang.Object)&quot;&gt;&lt;tt&gt;setValue&lt;/tt&gt;&lt;/a&gt; */"/>
    <method name="public final void endArray()" doc="/**
&lt;p&gt;Closes the array that was started using &lt;a href=&quot;QSettings.html#beginReadArray(java.lang.String)&quot;&gt;&lt;tt&gt;beginReadArray&lt;/tt&gt;&lt;/a&gt; or &lt;a href=&quot;QSettings.html#beginWriteArray(java.lang.String, int)&quot;&gt;&lt;tt&gt;beginWriteArray&lt;/tt&gt;&lt;/a&gt;.&lt;/p&gt;

@see &lt;a href=&quot;QSettings.html#beginReadArray(java.lang.String)&quot;&gt;&lt;tt&gt;beginReadArray&lt;/tt&gt;&lt;/a&gt;
@see &lt;a href=&quot;QSettings.html#beginWriteArray(java.lang.String, int)&quot;&gt;&lt;tt&gt;beginWriteArray&lt;/tt&gt;&lt;/a&gt; */"/>
    <method name="public final void endGroup()" doc="/**
&lt;p&gt;Resets the group to what it was before the corresponding &lt;a href=&quot;QSettings.html#beginGroup(java.lang.String)&quot;&gt;&lt;tt&gt;beginGroup&lt;/tt&gt;&lt;/a&gt; call.&lt;/p&gt;
&lt;p&gt;Example:&lt;/p&gt;
&lt;pre&gt;    settings.beginGroup(&amp;quot;alpha&amp;quot;);
&lt;span class=&quot;comment&quot;&gt;    //&lt;/span&gt; settings.group() == &amp;quot;alpha&amp;quot;

    settings.beginGroup(&amp;quot;beta&amp;quot;);
&lt;span class=&quot;comment&quot;&gt;    //&lt;/span&gt; settings.group() == &amp;quot;alpha/beta&amp;quot;

    settings.endGroup();
&lt;span class=&quot;comment&quot;&gt;    //&lt;/span&gt; settings.group() == &amp;quot;alpha&amp;quot;

    settings.endGroup();
&lt;span class=&quot;comment&quot;&gt;    //&lt;/span&gt; settings.group() == &amp;quot;&amp;quot;&lt;/pre&gt;

@see &lt;a href=&quot;QSettings.html#beginGroup(java.lang.String)&quot;&gt;&lt;tt&gt;beginGroup&lt;/tt&gt;&lt;/a&gt;
@see &lt;a href=&quot;QSettings.html#group()&quot;&gt;&lt;tt&gt;group&lt;/tt&gt;&lt;/a&gt; */"/>
    <method name="public final boolean fallbacksEnabled()" doc="/**
&lt;p&gt;Returns true if fallbacks are enabled; returns false otherwise.&lt;/p&gt;
&lt;p&gt;By default, fallbacks are enabled.&lt;/p&gt;

@see &lt;a href=&quot;QSettings.html#setFallbacksEnabled(boolean)&quot;&gt;&lt;tt&gt;setFallbacksEnabled&lt;/tt&gt;&lt;/a&gt; */"/>
    <method name="public final java.lang.String fileName()" doc="/**
&lt;p&gt;Returns the path where settings written using this &lt;a href=&quot;QSettings.html#QSettings(com.trolltech.qt.core.QSettings.Scope, java.lang.String, java.lang.String, com.trolltech.qt.core.QObject)&quot;&gt;&lt;tt&gt;QSettings&lt;/tt&gt;&lt;/a&gt; object are stored.&lt;/p&gt;
&lt;p&gt;On Windows, if the format is QSettings::NativeFormat, the return value is a system registry path, not a file path.&lt;/p&gt;

@see &lt;a href=&quot;QSettings.html#isWritable()&quot;&gt;&lt;tt&gt;isWritable&lt;/tt&gt;&lt;/a&gt; */"/>
    <method name="public final java.lang.String group()" doc="/**
&lt;p&gt;Returns the current group.&lt;/p&gt;

@see &lt;a href=&quot;QSettings.html#beginGroup(java.lang.String)&quot;&gt;&lt;tt&gt;beginGroup&lt;/tt&gt;&lt;/a&gt;
@see &lt;a href=&quot;QSettings.html#endGroup()&quot;&gt;&lt;tt&gt;endGroup&lt;/tt&gt;&lt;/a&gt; */"/>
    <method name="public final boolean isWritable()" doc="/**
&lt;p&gt;Returns true if settings can be written using this &lt;a href=&quot;QSettings.html#QSettings(com.trolltech.qt.core.QSettings.Scope, java.lang.String, java.lang.String, com.trolltech.qt.core.QObject)&quot;&gt;&lt;tt&gt;QSettings&lt;/tt&gt;&lt;/a&gt; object; returns false otherwise.&lt;/p&gt;
&lt;p&gt;One reason why &lt;a href=&quot;QSettings.html#isWritable()&quot;&gt;&lt;tt&gt;isWritable&lt;/tt&gt;&lt;/a&gt; might return false is if &lt;a href=&quot;QSettings.html#QSettings(com.trolltech.qt.core.QSettings.Scope, java.lang.String, java.lang.String, com.trolltech.qt.core.QObject)&quot;&gt;&lt;tt&gt;QSettings&lt;/tt&gt;&lt;/a&gt; operates on a read-only file.&lt;/p&gt;
&lt;p&gt;&lt;b&gt;Warning:&lt;/b&gt; This function is not perfectly reliable, because the file permissions can change at any time.&lt;/p&gt;

@see &lt;a href=&quot;QSettings.html#fileName()&quot;&gt;&lt;tt&gt;fileName&lt;/tt&gt;&lt;/a&gt;
@see &lt;a href=&quot;QSettings.html#status()&quot;&gt;&lt;tt&gt;status&lt;/tt&gt;&lt;/a&gt;
@see &lt;a href=&quot;QSettings.html#sync()&quot;&gt;&lt;tt&gt;sync&lt;/tt&gt;&lt;/a&gt; */"/>
    <method name="public final void remove(java.lang.String key)" doc="/**
&lt;p&gt;Removes the setting &lt;tt&gt;key&lt;/tt&gt; and any sub-settings of &lt;tt&gt;key&lt;/tt&gt;.&lt;/p&gt;
&lt;p&gt;Example:&lt;/p&gt;
&lt;pre&gt;    QSettings settings;
    settings.setValue(&amp;quot;ape&amp;quot;);
    settings.setValue(&amp;quot;monkey&amp;quot;, 1);
    settings.setValue(&amp;quot;monkey/sea&amp;quot;, 2);
    settings.setValue(&amp;quot;monkey/doe&amp;quot;, 4);

    settings.remove(&amp;quot;monkey&amp;quot;);
    QStringList keys = settings.allKeys();
&lt;span class=&quot;comment&quot;&gt;    //&lt;/span&gt; keys: [&amp;quot;ape&amp;quot;]&lt;/pre&gt;
&lt;p&gt;Be aware that if one of the fallback locations contains a setting with the same key, that setting will be visible after calling &lt;a href=&quot;QSettings.html#remove(java.lang.String)&quot;&gt;&lt;tt&gt;remove&lt;/tt&gt;&lt;/a&gt;.&lt;/p&gt;
&lt;p&gt;If &lt;tt&gt;key&lt;/tt&gt; is an empty string, all keys in the current &lt;a href=&quot;QSettings.html#group()&quot;&gt;&lt;tt&gt;group&lt;/tt&gt;&lt;/a&gt; are removed. For example:&lt;/p&gt;
&lt;pre&gt;    QSettings settings;
    settings.setValue(&amp;quot;ape&amp;quot;);
    settings.setValue(&amp;quot;monkey&amp;quot;, 1);
    settings.setValue(&amp;quot;monkey/sea&amp;quot;, 2);
    settings.setValue(&amp;quot;monkey/doe&amp;quot;, 4);

    settings.beginGroup(&amp;quot;monkey&amp;quot;);
    settings.remove(&amp;quot;&amp;quot;);
    settings.endGroup();

    QStringList keys = settings.allKeys();
&lt;span class=&quot;comment&quot;&gt;    //&lt;/span&gt; keys: [&amp;quot;ape&amp;quot;]&lt;/pre&gt;

@see &lt;a href=&quot;QSettings.html#setValue(java.lang.String, java.lang.Object)&quot;&gt;&lt;tt&gt;setValue&lt;/tt&gt;&lt;/a&gt;
@see &lt;a href=&quot;QSettings.html#value(java.lang.String, java.lang.Object)&quot;&gt;&lt;tt&gt;value&lt;/tt&gt;&lt;/a&gt;
@see &lt;a href=&quot;QSettings.html#contains(java.lang.String)&quot;&gt;&lt;tt&gt;contains&lt;/tt&gt;&lt;/a&gt; */"/>
    <method name="public final void setArrayIndex(int i)" doc="/**
&lt;p&gt;Sets the current array index to &lt;tt&gt;i&lt;/tt&gt;. Calls to functions such as &lt;a href=&quot;QSettings.html#setValue(java.lang.String, java.lang.Object)&quot;&gt;&lt;tt&gt;setValue&lt;/tt&gt;&lt;/a&gt;, &lt;a href=&quot;QSettings.html#value(java.lang.String, java.lang.Object)&quot;&gt;&lt;tt&gt;value&lt;/tt&gt;&lt;/a&gt;, &lt;a href=&quot;QSettings.html#remove(java.lang.String)&quot;&gt;&lt;tt&gt;remove&lt;/tt&gt;&lt;/a&gt;, and &lt;a href=&quot;QSettings.html#contains(java.lang.String)&quot;&gt;&lt;tt&gt;contains&lt;/tt&gt;&lt;/a&gt; will operate on the array entry at that index.&lt;/p&gt;
&lt;p&gt;You must call &lt;a href=&quot;QSettings.html#beginReadArray(java.lang.String)&quot;&gt;&lt;tt&gt;beginReadArray&lt;/tt&gt;&lt;/a&gt; or &lt;a href=&quot;QSettings.html#beginWriteArray(java.lang.String, int)&quot;&gt;&lt;tt&gt;beginWriteArray&lt;/tt&gt;&lt;/a&gt; before you can call this function.&lt;/p&gt;
 */"/>
    <method name="public final void setFallbacksEnabled(boolean b)" doc="/**
&lt;p&gt;Sets whether fallbacks are enabled to &lt;tt&gt;b&lt;/tt&gt;.&lt;/p&gt;
&lt;p&gt;By default, fallbacks are enabled.&lt;/p&gt;

@see &lt;a href=&quot;QSettings.html#fallbacksEnabled()&quot;&gt;&lt;tt&gt;fallbacksEnabled&lt;/tt&gt;&lt;/a&gt; */"/>
    <method name="public final void setValue(java.lang.String key, java.lang.Object value)" doc="/**
&lt;p&gt;Sets the value of setting &lt;tt&gt;key&lt;/tt&gt; to &lt;tt&gt;value&lt;/tt&gt;.&lt;/p&gt;
&lt;p&gt;If the key already exists, the previous value is overwritten.&lt;/p&gt;
&lt;p&gt;Example:&lt;/p&gt;
&lt;pre&gt;    QSettings settings;
    settings.setValue(&amp;quot;interval&amp;quot;, 30);
    settings.value(&amp;quot;interval&amp;quot;).toInt();     &lt;span class=&quot;comment&quot;&gt;//&lt;/span&gt; returns 30

    settings.setValue(&amp;quot;interval&amp;quot;, 6.55);
    settings.value(&amp;quot;interval&amp;quot;).toDouble();  &lt;span class=&quot;comment&quot;&gt;//&lt;/span&gt; returns 6.55&lt;/pre&gt;

@see &lt;a href=&quot;QSettings.html#value(java.lang.String, java.lang.Object)&quot;&gt;&lt;tt&gt;value&lt;/tt&gt;&lt;/a&gt;
@see &lt;a href=&quot;QSettings.html#remove(java.lang.String)&quot;&gt;&lt;tt&gt;remove&lt;/tt&gt;&lt;/a&gt;
@see &lt;a href=&quot;QSettings.html#contains(java.lang.String)&quot;&gt;&lt;tt&gt;contains&lt;/tt&gt;&lt;/a&gt; */"/>
    <method name="public final com.trolltech.qt.core.QSettings.Status status()" doc="/**
&lt;p&gt;Returns a status code indicating the first error that was met by &lt;a href=&quot;QSettings.html#QSettings(com.trolltech.qt.core.QSettings.Scope, java.lang.String, java.lang.String, com.trolltech.qt.core.QObject)&quot;&gt;&lt;tt&gt;QSettings&lt;/tt&gt;&lt;/a&gt;, or QSettings::NoError if no error occurred.&lt;/p&gt;
 */"/>
    <method name="public final void sync()" doc="/**
&lt;p&gt;Writes any unsaved changes to permanent storage, and reloads any settings that have been changed in the meantime by another application.&lt;/p&gt;
&lt;p&gt;Unless you use &lt;a href=&quot;QSettings.html#QSettings(com.trolltech.qt.core.QSettings.Scope, java.lang.String, java.lang.String, com.trolltech.qt.core.QObject)&quot;&gt;&lt;tt&gt;QSettings&lt;/tt&gt;&lt;/a&gt; as a communication mechanism between different processes, you normally don't need to call this function.&lt;/p&gt;
 */"/>
    <method name="public final java.lang.Object value(java.lang.String key, java.lang.Object defaultValue)" doc="/**
&lt;p&gt;Returns the value for setting &lt;tt&gt;key&lt;/tt&gt;. If the setting doesn't exist, returns &lt;tt&gt;defaultValue&lt;/tt&gt;.&lt;/p&gt;
&lt;p&gt;If no default value is specified, a default &lt;a href=&quot;%2E%2E/porting4.html#qvariant&quot;&gt;&lt;tt&gt;QVariant&lt;/tt&gt;&lt;/a&gt; is returned.&lt;/p&gt;
&lt;p&gt;Example:&lt;/p&gt;
&lt;pre&gt;    QSettings settings;
    settings.setValue(&amp;quot;animal/snake&amp;quot;, 58);
    settings.value(&amp;quot;animal/snake&amp;quot;, 1024).toInt();   &lt;span class=&quot;comment&quot;&gt;//&lt;/span&gt; returns 58
    settings.value(&amp;quot;animal/zebra&amp;quot;, 1024).toInt();   &lt;span class=&quot;comment&quot;&gt;//&lt;/span&gt; returns 1024
    settings.value(&amp;quot;animal/zebra&amp;quot;).toInt();         &lt;span class=&quot;comment&quot;&gt;//&lt;/span&gt; returns 0&lt;/pre&gt;

@see &lt;a href=&quot;QSettings.html#setValue(java.lang.String, java.lang.Object)&quot;&gt;&lt;tt&gt;setValue&lt;/tt&gt;&lt;/a&gt;
@see &lt;a href=&quot;QSettings.html#contains(java.lang.String)&quot;&gt;&lt;tt&gt;contains&lt;/tt&gt;&lt;/a&gt;
@see &lt;a href=&quot;QSettings.html#remove(java.lang.String)&quot;&gt;&lt;tt&gt;remove&lt;/tt&gt;&lt;/a&gt; */"/>
    <method name="public final java.lang.Object value(java.lang.String key)" doc="/**
&lt;p&gt;Equivalent to &lt;a href=&quot;QSettings.html#value(java.lang.String, java.lang.Object)&quot;&gt;value&lt;/tt&gt;&lt;/a&gt;(&lt;tt&gt;key&lt;/tt&gt;, QVariant()). */"/>
    <method name="public boolean event(com.trolltech.qt.core.QEvent event)" doc="/**
&lt;p&gt;This function is reimplemented for internal reasons.&lt;/p&gt;
 */"/>
    <method name="public static void setPath(com.trolltech.qt.core.QSettings.Format format, com.trolltech.qt.core.QSettings.Scope scope, java.lang.String path)" doc="/**
&lt;p&gt;Sets the path used for storing settings for the given &lt;tt&gt;format&lt;/tt&gt; and &lt;tt&gt;scope&lt;/tt&gt;, to &lt;tt&gt;path&lt;/tt&gt;. The &lt;tt&gt;format&lt;/tt&gt; can be a custom format.&lt;/p&gt;
&lt;p&gt;The table below summarizes the default values:&lt;/p&gt;
&lt;p&gt;&lt;table align=&quot;center&quot; cellpadding=&quot;2&quot; cellspacing=&quot;1&quot; border=&quot;0&quot;&gt;
&lt;thead&gt;&lt;tr valign=&quot;top&quot; class=&quot;qt-style&quot;&gt;&lt;th&gt;Platform&lt;/th&gt;&lt;th&gt;Format&lt;/th&gt;&lt;th&gt;Scope&lt;/th&gt;&lt;th&gt;Path&lt;/th&gt;&lt;/tr&gt;&lt;/thead&gt;
&lt;tr valign=&quot;top&quot; class=&quot;odd&quot;&gt;&lt;td rowspan=&quot;2&quot;&gt;Windows&lt;/td&gt;&lt;td rowspan=&quot;2&quot;&gt;&lt;a href=&quot;QSettings.html#Format-enum&quot;&gt;&lt;tt&gt;IniFormat&lt;/tt&gt;&lt;/a&gt;&lt;/td&gt;&lt;td&gt;&lt;a href=&quot;QSettings.html#Scope-enum&quot;&gt;&lt;tt&gt;UserScope&lt;/tt&gt;&lt;/a&gt;&lt;/td&gt;&lt;td&gt;&lt;tt&gt;%APPDATA%&lt;/tt&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr valign=&quot;top&quot; class=&quot;even&quot;&gt;&lt;td&gt;&lt;a href=&quot;QSettings.html#Scope-enum&quot;&gt;&lt;tt&gt;SystemScope&lt;/tt&gt;&lt;/a&gt;&lt;/td&gt;&lt;td&gt;&lt;tt&gt;%COMMON_APPDATA%&lt;/tt&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr valign=&quot;top&quot; class=&quot;odd&quot;&gt;&lt;td rowspan=&quot;2&quot;&gt;Unix&lt;/td&gt;&lt;td rowspan=&quot;2&quot;&gt;&lt;a href=&quot;QSettings.html#Format-enum&quot;&gt;&lt;tt&gt;NativeFormat&lt;/tt&gt;&lt;/a&gt;, &lt;a href=&quot;QSettings.html#Format-enum&quot;&gt;&lt;tt&gt;IniFormat&lt;/tt&gt;&lt;/a&gt;&lt;/td&gt;&lt;td&gt;&lt;a href=&quot;QSettings.html#Scope-enum&quot;&gt;&lt;tt&gt;UserScope&lt;/tt&gt;&lt;/a&gt;&lt;/td&gt;&lt;td&gt;&lt;tt&gt;$HOME/.config&lt;/tt&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr valign=&quot;top&quot; class=&quot;even&quot;&gt;&lt;td&gt;&lt;a href=&quot;QSettings.html#Scope-enum&quot;&gt;&lt;tt&gt;SystemScope&lt;/tt&gt;&lt;/a&gt;&lt;/td&gt;&lt;td&gt;&lt;tt&gt;/etc/xdg&lt;/tt&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr valign=&quot;top&quot; class=&quot;odd&quot;&gt;&lt;td rowspan=&quot;2&quot;&gt;Mac OS X&lt;/td&gt;&lt;td rowspan=&quot;2&quot;&gt;&lt;a href=&quot;QSettings.html#Format-enum&quot;&gt;&lt;tt&gt;IniFormat&lt;/tt&gt;&lt;/a&gt;&lt;/td&gt;&lt;td&gt;&lt;a href=&quot;QSettings.html#Scope-enum&quot;&gt;&lt;tt&gt;UserScope&lt;/tt&gt;&lt;/a&gt;&lt;/td&gt;&lt;td&gt;&lt;tt&gt;$HOME/.config&lt;/tt&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr valign=&quot;top&quot; class=&quot;even&quot;&gt;&lt;td&gt;&lt;a href=&quot;QSettings.html#Scope-enum&quot;&gt;&lt;tt&gt;SystemScope&lt;/tt&gt;&lt;/a&gt;&lt;/td&gt;&lt;td&gt;&lt;tt&gt;/etc/xdg&lt;/tt&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;/table&gt;&lt;/p&gt;
&lt;p&gt;The default &lt;a href=&quot;QSettings.html#Scope-enum&quot;&gt;&lt;tt&gt;UserScope&lt;/tt&gt;&lt;/a&gt; paths on Unix and Mac OS X (&lt;tt&gt;$HOME/.config&lt;/tt&gt;) can be overridden by the user by setting the &lt;tt&gt;XDG_CONFIG_HOME&lt;/tt&gt; environment variable. The default &lt;a href=&quot;QSettings.html#Scope-enum&quot;&gt;&lt;tt&gt;SystemScope&lt;/tt&gt;&lt;/a&gt; paths on Unix and Mac OS X (&lt;tt&gt;/etc/xdg&lt;/tt&gt;) can be overridden when building the Qt library using the &lt;tt&gt;configure&lt;/tt&gt; script's &lt;tt&gt;--sysconfdir&lt;/tt&gt; flag (see &lt;a href=&quot;QLibraryInfo.html&quot;&gt;&lt;tt&gt;QLibraryInfo&lt;/tt&gt;&lt;/a&gt; for details).&lt;/p&gt;
&lt;p&gt;Setting the &lt;a href=&quot;QSettings.html#Format-enum&quot;&gt;&lt;tt&gt;NativeFormat&lt;/tt&gt;&lt;/a&gt; paths on Windows and Mac OS X has no effect.&lt;/p&gt;
&lt;p&gt;&lt;b&gt;Warning:&lt;/b&gt; This function doesn't affect existing &lt;a href=&quot;QSettings.html#QSettings(com.trolltech.qt.core.QSettings.Scope, java.lang.String, java.lang.String, com.trolltech.qt.core.QObject)&quot;&gt;&lt;tt&gt;QSettings&lt;/tt&gt;&lt;/a&gt; objects.&lt;/p&gt;

@see &lt;tt&gt;registerFormat&lt;/tt&gt; */"/>
    <enum name="Format" doc="/**
&lt;p&gt;This enum type specifies the storage format used by &lt;a href=&quot;QSettings.html#QSettings(com.trolltech.qt.core.QSettings.Scope, java.lang.String, java.lang.String, com.trolltech.qt.core.QObject)&quot;&gt;&lt;tt&gt;QSettings&lt;/tt&gt;&lt;/a&gt;.&lt;/p&gt;
&lt;p&gt;On Unix, &lt;a href=&quot;QSettings.html#Format-enum&quot;&gt;&lt;tt&gt;NativeFormat&lt;/tt&gt;&lt;/a&gt; and &lt;a href=&quot;QSettings.html#Format-enum&quot;&gt;&lt;tt&gt;IniFormat&lt;/tt&gt;&lt;/a&gt; mean the same thing, except that the file extension is different (&lt;tt&gt;.conf&lt;/tt&gt; for &lt;a href=&quot;QSettings.html#Format-enum&quot;&gt;&lt;tt&gt;NativeFormat&lt;/tt&gt;&lt;/a&gt;, &lt;tt&gt;.ini&lt;/tt&gt; for &lt;a href=&quot;QSettings.html#Format-enum&quot;&gt;&lt;tt&gt;IniFormat&lt;/tt&gt;&lt;/a&gt;).&lt;/p&gt;
&lt;p&gt;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:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;If you store types that &lt;a href=&quot;%2E%2E/porting4.html#qvariant&quot;&gt;&lt;tt&gt;QVariant&lt;/tt&gt;&lt;/a&gt; can't convert to &lt;a href=&quot;%2E%2E/porting4.html#qstring&quot;&gt;&lt;tt&gt;QString&lt;/tt&gt;&lt;/a&gt; (e.g&amp;#x2e;, &lt;a href=&quot;QPoint.html&quot;&gt;&lt;tt&gt;QPoint&lt;/tt&gt;&lt;/a&gt;, &lt;a href=&quot;QRect.html&quot;&gt;&lt;tt&gt;QRect&lt;/tt&gt;&lt;/a&gt;, and &lt;a href=&quot;QSize.html&quot;&gt;&lt;tt&gt;QSize&lt;/tt&gt;&lt;/a&gt;), Qt uses an &lt;tt&gt;@&lt;/tt&gt;-based syntax to encode the type. For example:&lt;pre&gt;    pos = @Point(100 100)&lt;/pre&gt;
&lt;p&gt;To minimize compatibility issues, any &lt;tt&gt;@&lt;/tt&gt; that doesn't appear at the first position in the value or that isn't followed by a Qt type (&lt;tt&gt;Point&lt;/tt&gt;, &lt;tt&gt;Rect&lt;/tt&gt;, &lt;tt&gt;Size&lt;/tt&gt;, etc.) is treated as a normal character.&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;Although backslash is a special character in INI files, most Windows applications don't escape backslashes (&lt;tt&gt;\&lt;/tt&gt;) in file paths:&lt;pre&gt;    windir = C:\Windows&lt;/pre&gt;
&lt;p&gt;&lt;a href=&quot;QSettings.html#QSettings(com.trolltech.qt.core.QSettings.Scope, java.lang.String, java.lang.String, com.trolltech.qt.core.QObject)&quot;&gt;&lt;tt&gt;QSettings&lt;/tt&gt;&lt;/a&gt; always treats backslash as a special character and provides no API for reading or writing such entries.&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;The INI file format has severe restrictions on the syntax of a key. Qt works around this by using &lt;tt&gt;%&lt;/tt&gt; as an escape character in keys. In addition, if you save a top-level setting (a key with no slashes in it, e.g&amp;#x2e;, &amp;quot;someKey&amp;quot;), it will appear in the INI file's &amp;quot;General&amp;quot; section. To avoid overwriting other keys, if you save something using the a key such as &amp;quot;General/someKey&amp;quot;, the key will be located in the &amp;quot;%General&amp;quot; section, &lt;i&gt;not&lt;/i&gt; in the &amp;quot;General&amp;quot; section.&lt;/li&gt;
&lt;/ul&gt;

@see &lt;tt&gt;registerFormat&lt;/tt&gt;
@see &lt;a href=&quot;QSettings.html#setPath(com.trolltech.qt.core.QSettings.Format, com.trolltech.qt.core.QSettings.Scope, java.lang.String)&quot;&gt;&lt;tt&gt;setPath&lt;/tt&gt;&lt;/a&gt; */">
        <enum-value name="NativeFormat" doc="/**
&lt;p&gt;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.&lt;/p&gt;
 */"/>
        <enum-value name="IniFormat" doc="/**
&lt;p&gt;Store the settings in INI files.&lt;/p&gt;
 */"/>
        <enum-value name="InvalidFormat" doc="/**
&lt;p&gt;Special value returned by registerFormat().&lt;/p&gt;
 */"/>
        <enum-value name="CustomFormat1" doc="/**
Internal. */"/>
        <enum-value name="CustomFormat2" doc="/**
Internal. */"/>
        <enum-value name="CustomFormat3" doc="/**
Internal. */"/>
        <enum-value name="CustomFormat4" doc="/**
Internal. */"/>
        <enum-value name="CustomFormat5" doc="/**
Internal. */"/>
        <enum-value name="CustomFormat6" doc="/**
Internal. */"/>
        <enum-value name="CustomFormat7" doc="/**
Internal. */"/>
        <enum-value name="CustomFormat8" doc="/**
Internal. */"/>
        <enum-value name="CustomFormat9" doc="/**
Internal. */"/>
        <enum-value name="CustomFormat10" doc="/**
Internal. */"/>
        <enum-value name="CustomFormat11" doc="/**
Internal. */"/>
        <enum-value name="CustomFormat12" doc="/**
Internal. */"/>
        <enum-value name="CustomFormat13" doc="/**
Internal. */"/>
        <enum-value name="CustomFormat14" doc="/**
Internal. */"/>
        <enum-value name="CustomFormat15" doc="/**
Internal. */"/>
        <enum-value name="CustomFormat16" doc="/**
Internal. */"/>
</enum>
    <enum name="Status" doc="/**
&lt;p&gt;The following status values are possible:&lt;/p&gt;
&lt;p&gt;&lt;table border=&quot;1&quot; cellpadding=&quot;2&quot; cellspacing=&quot;1&quot; width=&quot;100%&quot;&gt;
&lt;tr&gt;&lt;th width=&quot;25%&quot;&gt;Constant&lt;/th&gt;&lt;th width=&quot;15%&quot;&gt;Value&lt;/th&gt;&lt;th width=&quot;60%&quot;&gt;Description&lt;/th&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td valign=&quot;top&quot;&gt;&lt;tt&gt;NoError&lt;/tt&gt;&lt;/td&gt;&lt;td align=&quot;center&quot; valign=&quot;top&quot;&gt;&lt;tt&gt;0&lt;/tt&gt;&lt;/td&gt;&lt;td valign=&quot;top&quot;&gt;No error occurred.&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td valign=&quot;top&quot;&gt;&lt;tt&gt;AccessError&lt;/tt&gt;&lt;/td&gt;&lt;td align=&quot;center&quot; valign=&quot;top&quot;&gt;&lt;tt&gt;1&lt;/tt&gt;&lt;/td&gt;&lt;td valign=&quot;top&quot;&gt;An access error occurred (e.g&amp;#x2e; trying to write to a read-only file).&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td valign=&quot;top&quot;&gt;&lt;tt&gt;FormatError&lt;/tt&gt;&lt;/td&gt;&lt;td align=&quot;center&quot; valign=&quot;top&quot;&gt;&lt;tt&gt;2&lt;/tt&gt;&lt;/td&gt;&lt;td valign=&quot;top&quot;&gt;A format error occurred (e.g&amp;#x2e; loading a malformed INI file).&lt;/td&gt;&lt;/tr&gt;
&lt;/table&gt;&lt;/p&gt;

@see &lt;a href=&quot;QSettings.html#status()&quot;&gt;&lt;tt&gt;status&lt;/tt&gt;&lt;/a&gt; */">
        <enum-value name="NoError" doc="/**
&lt;p&gt;No error occurred.&lt;/p&gt;
 */"/>
        <enum-value name="AccessError" doc="/**
&lt;p&gt;An access error occurred (e.g&amp;#x2e; trying to write to a read-only file).&lt;/p&gt;
 */"/>
        <enum-value name="FormatError" doc="/**
&lt;p&gt;A format error occurred (e.g&amp;#x2e; loading a malformed INI file).&lt;/p&gt;
 */"/>
</enum>
    <enum name="Scope" doc="/**
&lt;p&gt;This enum specifies whether settings are user-specific or shared by all users of the same system.&lt;/p&gt;

@see &lt;a href=&quot;QSettings.html#setPath(com.trolltech.qt.core.QSettings.Format, com.trolltech.qt.core.QSettings.Scope, java.lang.String)&quot;&gt;&lt;tt&gt;setPath&lt;/tt&gt;&lt;/a&gt; */">
        <enum-value name="UserScope" doc="/**
&lt;p&gt;Store settings in a location specific to the current user (e.g&amp;#x2e;, in the user's home directory).&lt;/p&gt;
 */"/>
        <enum-value name="SystemScope" doc="/**
&lt;p&gt;Store settings in a global location, so that all users on the same machine access the same set of settings.&lt;/p&gt;
 */"/>
</enum>
</class>
