Well, I just read in the docs that this doesn't work on X11( the set/restoreGeometry stuff).
They suggest using the following:
void MainWindow::readSettings()
{
QSettings settings
("Trolltech",
"Application Example");
QPoint pos
= settings.
value("pos",
QPoint(200,
200)).
toPoint();
QSize size
= settings.
value("size",
QSize(400,
400)).
toSize();
resize(size);
move(pos);
}
void MainWindow::writeSettings()
{
QSettings settings
("Trolltech",
"Application Example");
settings.setValue("pos", pos());
settings.setValue("size", size());
}
void MainWindow::readSettings()
{
QSettings settings("Trolltech", "Application Example");
QPoint pos = settings.value("pos", QPoint(200, 200)).toPoint();
QSize size = settings.value("size", QSize(400, 400)).toSize();
resize(size);
move(pos);
}
void MainWindow::writeSettings()
{
QSettings settings("Trolltech", "Application Example");
settings.setValue("pos", pos());
settings.setValue("size", size());
}
To copy to clipboard, switch view to plain text mode
Meaning that you must save the geometry manually.
Should work,
Regards
Bookmarks