Quote Originally Posted by conexion2000
Here is sample:


So I would like to do something similar. As You can see there is some QGroupBox with 3 horizontal QLayouts in it. These layouts contains some widgets. And here appears my problem. How to put these layouts inside this groupbox. Setting QGroupBox as a parent doesn't seem to work, because debug functions say that QGroupBox already have a layout. When I do that in a "traditional way" (creating QLayout with QGroupBox as a parent) these widgets don't show in program.
Please help.
You must use QWidget::setLayout.

Qt Code:
  1. lay1->addWidget(wgt1_1);
  2. ...
  3. lay1->addWidget(wgt1_N);
  4.  
  5. ..........
  6.  
  7. layN->addWidget(wgtN_1);
  8. ...
  9. layN->addWidget(wgtN_N);
  10.  
  11. v->addLayout(lay1);
  12. ...
  13. v->addLayout(layN);
  14.  
  15. grpBox->setLayout(v)
To copy to clipboard, switch view to plain text mode 

where wgtX_X are widget to add and grpBox are your QGroupBox.