Qt Code:
  1. dialog->layout()->setSizeConstraint(QLayout::SetFixedSize);
To copy to clipboard, switch view to plain text mode