Logo Search packages:      
Sourcecode: qt4-x11 version File versions

void QSettings::setValue ( const QString key,
const QVariant value 
)

Sets the value of setting key to value. If the key already exists, the previous value is overwritten.

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 {Key Syntax} rules.

Example:

doc/src/snippets/code/src_corelib_io_qsettings.cpp 23

See also:
value(), remove(), contains()

Definition at line 3134 of file qsettings.cpp.

Referenced by beginWriteArray(), endArray(), MainWindow::writeSettings(), QColorDialog::~QColorDialog(), and QFileDialog::~QFileDialog().

{
    Q_D(QSettings);
    QString k = d->actualKey(key);
    d->set(k, value);
    d->requestUpdate();
}


Generated by  Doxygen 1.6.0   Back to index