void mwindow::resizeEvent(QResizeEvent *event){ QSize newSize = event->size(); QSize oldSize = event->oldSize(); if(!newSize.isValid() || !oldSize.isValid()){ return; } if(newSize == oldSize || newSize == s) { return; } qDebug("wN=%d hN=%d wO=%d hO=%d",newSize.width(),newSize.height(),oldSize.width(),oldSize.height()); oldSize.setWidth(newSize.width()); oldSize.setHeight(newSize.width()); //QApplication::processEvents(); s = oldSize; resize(oldSize); QDialog::resizeEvent(event);}