To save a state use something like:
settings.beginGroup( "MyGroup" );
settings.setValue( "MyStateName", saveState(0) );
settings.endGroup();
QSettings settings( "MyIniFile.ini", QSettings::IniFormat );
settings.beginGroup( "MyGroup" );
settings.setValue( "MyStateName", saveState(0) );
settings.endGroup();
To copy to clipboard, switch view to plain text mode
To restore it use:
settings.beginGroup( "MyGroup" );
restoreState
( settings.
value( "MyStateName",
QByteArray() ).
toByteArray(),
0 );
settings.endGroup();
QSettings settings( "MyIniFile.ini", QSettings::IniFormat );
settings.beginGroup( "MyGroup" );
restoreState( settings.value( "MyStateName", QByteArray() ).toByteArray(), 0 );
settings.endGroup();
To copy to clipboard, switch view to plain text mode
I develop mainly on Windows but prefer the INI storage format as it doesn't intefere with the registry and can be easily edited by hand (with the exception of states...).
You'll need to change your ini, group and state names accordingly (all the strings).
For more detailed work refer to QSettings.
Hope this helps.
Bookmarks