ser_bur
16th May 2007, 19:43
Hi, guys.
Need some help...
The task is following: I need to place into QGroupBox some number of widgets - for example, QLabel. After filling this QGroupBox scrollbar must appear.
Code is next:
extGroupLayout = new QVBoxLayout;
groupBoxLayout = new QVBoxLayout;
scrollArea = new QScrollArea(this);
groupBox->setLayout(extGroupLayout);
extGroupLayout->addWidget(scrollArea);
scrollArea->setLayout(groupBoxLayout);
for(i=0;i<20;i++)
{
// Let's make our checkboxes...
IDCheckbox[i] = new QCheckBox;
groupBoxLayout->addWidget(IDCheckbox[i]);
}
After executing, checkboxes get minimal possible height, ignoring value, set by setMinimalHeight method; last of them are hiding behind the edge of scroll area, but scrolling is still impossible :mad:
Where is my problem? Don't say it is in my head :o
Need some help...
The task is following: I need to place into QGroupBox some number of widgets - for example, QLabel. After filling this QGroupBox scrollbar must appear.
Code is next:
extGroupLayout = new QVBoxLayout;
groupBoxLayout = new QVBoxLayout;
scrollArea = new QScrollArea(this);
groupBox->setLayout(extGroupLayout);
extGroupLayout->addWidget(scrollArea);
scrollArea->setLayout(groupBoxLayout);
for(i=0;i<20;i++)
{
// Let's make our checkboxes...
IDCheckbox[i] = new QCheckBox;
groupBoxLayout->addWidget(IDCheckbox[i]);
}
After executing, checkboxes get minimal possible height, ignoring value, set by setMinimalHeight method; last of them are hiding behind the edge of scroll area, but scrolling is still impossible :mad:
Where is my problem? Don't say it is in my head :o