PDA

View Full Version : qhlayout



mickey
1st April 2006, 18:54
Hi, I'd like need below but appear only a checkBox and I think this not work totally;
I need put 8 check box in a horizontally layout; why this don't work properly? Thanks


QWidget* wid = new QWidget(myFrame);
QBoxLayout* hlay = new QHBoxLayout (wid,5,5);
QCheckBox* c0 = new QCheckBox(wid);
QCheckBox* c1 = new QCheckBox(wid);

munna
1st April 2006, 19:26
Add widgets to your layout by using hlay->addWidget() and then use wid->setLayout(hlay) at the end