void MainWindow::resizeEvent(QResizeEvent *e){ if(e->spontaneous()) { ... resize(x,y); } else QWidget::resizeEvent(e);}