title: Qt QWidget disable re sizing more than minimum size needed
body: <p>I have a <code>QGridLayout</code> inside a <code>QWidget</code>. I keep adding child <code>QGridLayouts</code> to this. I want the <code>QWidget</code> to resize according to the size needed for child layouts but for the user to be unable to resize it.</p>
  
  <p>MainWindow.cpp (<code>MainWindow</code> is inherited from <code>QWidget</code>)</p>
  
  <pre><code>MainWindow::MainWindow(QWidget *parent) :
      QWidget(parent)
  {
      QGridLayout *mainLayout = new QGridLayout();
      {
          AAController *ac1 = new AAController("Ins1");
          AAController *ac2 = new AAController("Ins2");
          AAController *ac3 = new AAController("Ins3");
  
          mainLayout-&gt;addLayout(ac1, 0, 0);
          mainLayout-&gt;addLayout(ac2, 0, 1);
          mainLayout-&gt;addLayout(ac3, 1, 1);
      }
      setLayout(mainLayout);
  }
  </code></pre>
  
  <p>AAController.cpp (<code>AAController</code> is inherited from <code>QGridLayout</code>)</p>
  
  <pre><code>AAController::AAController(const QString&amp; instrument)
      :_instrument(instrument)
  {
      _lblInstrument = new QLabel(_instrument);
      _lblMismatchThreshold = new QLabel("Mismatch threshold : ");
      _lblQuoteVolume = new QLabel("Quote volume : ");
      _btnUpdateAlgo = new QPushButton("Update Algo");
      _spnMismatchThreshold = new QSpinBox();
      _spnQuoteVolume = new QSpinBox();
  
      this-&gt;addWidget(_lblInstrument, 0, 1, 1, 2, Qt::AlignCenter);
      this-&gt;addWidget(_lblMismatchThreshold, 1, 0, 1, 2);
      this-&gt;addWidget(_lblQuoteVolume, 2, 0, 1, 2);
      this-&gt;addWidget(_btnUpdateAlgo, 3, 2, 1, 2);
      this-&gt;addWidget(_spnMismatchThreshold, 1, 3);
      this-&gt;addWidget(_spnQuoteVolume, 2, 3);
  
      setSizeConstraint(SetFixedSize);
  }
  </code></pre>
  
  <p>I get something like this: </p>
  
  <p><img src="https://i.stack.imgur.com/4dMHy.png" alt=""></p>
  
  <p>But at the moment I can resize this like:</p>
  
  <p><img src="https://i.stack.imgur.com/IE3KW.png" alt="enter image description here"></p>
  
  <p>I want to disable such resizing. How do I do this?</p>