
Originally Posted by
Med
I've tried to subclass it, unfortunately when calling tableWidget->height() from resizeEvent(), it still reports the wrong size.

However, as soon as i resize the window, the reported size is correct. It is a bit frustrating that it doesn't work at the first resizeEvent() call.
You should use values given by QResizeEvent:
qDebug("New size is: %d x %d", e->size().width(), e->size().height());
}
MyWidget::resizeEvent(QResizeEvent *e){
qDebug("New size is: %d x %d", e->size().width(), e->size().height());
QWidget::resizeEvent(e);
}
To copy to clipboard, switch view to plain text mode
On the other hand the docs say the widget already has it's new size set...
You could also try showEvent().
Bookmarks