@SGaist Hi, apologies - didn't want to delete and there was no other option...
EDIT: initial response snippet was unclear! adding more code.
A small example of values I wanted to put in that loop:
void PrefsDialog::defaultSection(const int idx) { QSettings settings; settings.beginWriteArray("visual"); settings.setArrayIndex(idx); settings.setValue("override",false); settings.setValue("txtClr",idx==1?"#00F":"#000"); settings.setValue("u",idx==1?true:false); settings.setValue("i",idx==2?true:false); settings.setValue("b",(idx>2&&idx<6)?true:false); settings.setValue("txtBg","#fff"); settings.setValue("ident",idx==2?15:0); settings.endArray(); }