Qt Code:
  1. QVboxLaout* l= new QVboxLayout;
  2. l->addWidget(endDeviceCombox);
  3. ui.groupBox_2->setLayout(l);
To copy to clipboard, switch view to plain text mode 
or get the groupbox layout by
Qt Code:
  1. /*QVBoxLayout QHBoxLayout or whatever you set in ui*/ *l = ui.groupBox_2->layout();
  2. l->addWidget(endDeviceCombox);
To copy to clipboard, switch view to plain text mode