That's not a right thing to do. It's better to apply a size constraint on the dialog's layout. The constraint should be set to SetFixedSize. Since Qt 4.4 you can do that from within Designer.