PDA

View Full Version : QGroupBox



Devoraz
30th July 2009, 04:05
hi all, i need to write this below command,


ui.groupBox_2->addWidget(endDeviceCombox);
but the error came out with "error C2039: 'addWidget' : is not a member of 'QGroupBox'"

is there any other way to add this widget?

nish
30th July 2009, 04:49
QVboxLaout* l= new QVboxLayout;
l->addWidget(endDeviceCombox);
ui.groupBox_2->setLayout(l);

or get the groupbox layout by

/*QVBoxLayout QHBoxLayout or whatever you set in ui*/ *l = ui.groupBox_2->layout();
l->addWidget(endDeviceCombox);