[Solved] Display QgroupBox on main window.
General and Desktop
7
Posts
3
Posters
1.4k
Views
1
Watching
-
Hi,
I would like to create and display a QgroupBox on my main window.
So far I do that:
@ QGroupBox *groupB=new QGroupBox();
QVBoxLayout *vbox = new QVBoxLayout();
int n=3;
QPushButton *button[n];
for(int i=1;i<=n;i++)
{
button[i]=new QPushButton();
button[i]->setText(i);
vbox->addWidget(button[i]);
}
groupB->setLayout(vbox);
groupB->show();@The group of boxes is created and display but on a "pop up" window.
How should I proceed to change this?Thanks
-
Hi,
You can call
@setCentralWidget(groupB);@
-
@groupB->hide();@