QScrollArea dynamically add QCheckBoxes
Qt, QCheckBoxes, QScrollArea, QWidget
Привет. Не получается добавить динамически чекбоксы в QScrollArea.
Что не так делаю?
QWidget materialContainer; QVBoxLayout *materialLay = new QVBoxLayout(this); materialContainer.setLayout(materialLay); ui->_materialScrollArea->setWidget(&materialContainer); foreach(NodePtr ptr, _materialModel->allItems()) { Material *entity = ptr.data()->item().value<Material*>(); QCheckBox *chBox = new QCheckBox(entity->name()); materialLay->addWidget(chBox); }
В данном случае ui->_materialScrollArea ничего не отображает.

We recommend hosting TIMEWEB
Stable hosting, on which the social network EVILEG is located. For projects on Django we recommend VDS hosting.Fornex
Let me recommend you a great European Fornex hosting.
Fornex has proven itself to be a stable host over the years.
For Django projects I recommend VPS hosting
Following the link you will receive a 5% discount on shared hosting services, dedicated servers, VPS and VPN
View HostingShare on social networks
Donate
The EVILEG project has switched to a non-commercial basis and will develop solely on the enthusiasm of the site creator, the enthusiasm of users, donations and the hosting referral system
Thank you for your support
Available ways to support the project
PayPal
PatreonYandex.MoneyMore
так правильно
Лучше здесь. В чем ошибка?
Всё правильно. Это просто спамер, который отправился в вечный бан.