// static
{
settings.beginGroup( group );
QVariant value
= settings.
value( key, defValue
);
settings.endGroup();
return value;
}
// static
{
settings.beginGroup( group );
settings.setValue( key, value );
settings.endGroup();
}
// static
QVariant QSettingsHelper::readValue( const QString & group, const QString & key, const QVariant & defValue )
{
QSettings settings( QSettings::IniFormat, QSettings::UserScope, QCoreApplication::organizationName(), QCoreApplication::applicationName() );
settings.beginGroup( group );
QVariant value = settings.value( key, defValue );
settings.endGroup();
return value;
}
// static
void QSettingsHelper::writeValue( const QString & group, const QString & key, const QVariant & value )
{
QSettings settings( QSettings::IniFormat, QSettings::UserScope, QCoreApplication::organizationName(), QCoreApplication::applicationName() );
settings.beginGroup( group );
settings.setValue( key, value );
settings.endGroup();
}
To copy to clipboard, switch view to plain text mode
Bookmarks