What exactly did you try? By the way, reimplementing sizeHint() probably won't do anything as it works only for widgets inside layouts. You should be able to use QWidget::resize() though.