

Each setting consists of a QString that specifies the setting's name (the key) and a QVariant that stores the data associated with the key. See the Platform-Specific Notes below for details.) If no domain is set, a fake domain is derived from the organization name.

QT SYNC FOR WINDOWS MAC OS X
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. (Here, we also specify the organization's Internet domain. QCoreApplication ::setApplicationName( "Star Runner") QCoreApplication ::setOrganizationDomain( "") If you use QSettings 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 QSettings constructor: QCoreApplication ::setOrganizationName( "MySoft") Constructing and destroying a QSettings object is very fast. QSettings objects can be created either on the stack or on the heap (i.e. For example, if your product is called Star Runner and your company is called MySoft, you would construct the QSettings object as follows: QSettings settings( "MySoft", "Star Runner") When creating a QSettings object, you must pass the name of your company or organization as well as the name of your application. If all you need is a non-persistent memory-based structure, consider using QMap instead. QSettings's API is based on QVariant, allowing you to save most value-based types, such as QString, QRect, and QImage, with the minimum of effort.
QT SYNC FOR WINDOWS PORTABLE
QSettings is an abstraction around these technologies, enabling you to save and restore application settings in a portable manner. On Unix systems, in the absence of a standard, many applications (including the KDE applications) use INI text files. This information is often stored in the system registry on Windows, and in XML preferences files on Mac OS X. Users normally expect an application to remember its settings (window sizes and positions, options, etc.) across sessions. The QSettings class provides persistent platform-independent application settings. 8 protected functions inherited from QObject.Reimplemented Protected Functions virtual bool 7 static public members inherited from QObject.SetPath ( Format format, Scope scope, const QString & path ) RegisterFormat ( const QString & extension, ReadFunc readFunc, WriteFunc writeFunc, Qt::CaseSensitivity caseSensitivity = Qt::CaseSensitive ) 29 public functions inherited from QObject.Value ( const QString & key, const QVariant & defaultValue = QVariant() ) const SetValue ( const QString & key, const QVariant & value ) QSettings ( const QString & fileName, Format format, QObject * parent = 0 )īeginReadArray ( const QString & prefix )īeginWriteArray ( const QString & prefix, int size = -1 ) QSettings ( Format format, Scope scope, const QString & organization, const QString & application = QString(), QObject * parent = 0 ) QSettings ( Scope scope, const QString & organization, const QString & application = QString(), QObject * parent = 0 ) QSettings ( const QString & organization, const QString & application = QString(), QObject * parent = 0 ) List of all members, including inherited membersįormat.Note: All functions in this class are reentrant, but registerFormat() is also thread-safe. Changing the location of global Qt settings on Mac OS X.Securing application settings in Symbian.
QT SYNC FOR WINDOWS WINDOWS
Accessing Common Registry Settings on Windows.Accessing the Windows Registry Directly.Locations Where Application Settings Are Stored.Accessing Settings from Multiple Threads or Processes Simultaneously.Restoring the State of a GUI Application.
