C++ (Qt)bool ret = object->setProperty(name,value);
void MainWindow::closeEvent(QCloseEvent *event){ QSettings settings("MyCompany", "MyApp"); settings.beginGroup("prop"); settings.setValue( "geometry", geometry() ); settings.endGroup(); QMainWindow::closeEvent(event);}void MainWindow::readSettings(){ QSettings settings("MyCompany", "MyApp"); settings.beginGroup("prop"); QStringList prop_keys = settings.allKeys(); while( prop_keys.size() ) { QString key = prop_keys.takeFirst(); setProperty( qPrintable(key), settings.value(key) ); } settings.endGroup();}