I am trying QSettings now. I am following the following approach. I have taken two buttons and I am trying to enable and set style sheet of button 1 when I click button 2.

[button]

button1 = 1;
stylesheet = background-color:green;

And in the button 2 click slot

QSettings settings("/root/config.ini",QSettings::IniFormat);
settings.beginGroup("button);
button1->setEnabled(settings.value("button1").toBool());
button1->setStylesheet(settings.value("stylesheet").toStri ng());

But this doesn't seem to be working. Where am I going wrong?