Talk:Saving Window Size State

From Qt Wiki
Revision as of 12:11, 10 January 2019 by ChrisEmsen (talk | contribs) (Possible correction required)
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
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);
 }