I save and restore a QMainWindow's size and position as follows:
window->resize(savedSize);
window->move(savedPos);
window->show();
void closeEvent(QCloseEvent *e) {
savedSize = window->size();
savedPos = window->pos();
}
The problem is that the window position is changed by the applications bar (the bar where the Windows minimize and maximize buttons are). So when I open and close the window a few times then the window moves more and more down (each time exactly the size of the application bar). How can I exactly restore the last position?
Regards,