C++ (Qt)void MainWindow::loadSettings (){ QSettings settings; settings.beginGroup ("GUI"); settings.beginGroup ("MainWindow"); const QPoint pos = settings.value ("pos").toPoint(); if (!pos.isNull()) { move (pos); } settings.endGroup(); settings.endGroup();} void MainWindow::saveSettings (){ QSettings settings; settings.beginGroup ("GUI"); settings.beginGroup ("MainWindow"); settings.setValue ("pos", pos()); settings.endGroup(); settings.endGroup();}
C++ (Qt)QByteArray QWidget::saveGeometry () constbool QWidget::restoreGeometry ( const QByteArray & geometry )
C++ (Qt)int QDesktopWidget::screenNumber ( const QWidget * widget = 0 ) const