Talk:Saving Window Size State

From Qt Wiki
Jump to navigation Jump to search

The docs for saveGeometry say base class function QWidget::closeEvent should be called - should that be included in this example?

 void MyWidget::closeEvent(QCloseEvent *event)
 {
     QSettings settings("MyCompany", "MyApp");
     settings.setValue("geometry", saveGeometry());
     QWidget::closeEvent(event);
 }