I'm adding the list widget to the group box and then setting a scrollwidget for it and adding that to the layout. But still the problem persists.
Here's my code:
for()
{
list
->setIconSize
(QSize(500,
500));
}
vLayout->addWidget(list);
groupBox->setLayout(vLayout);
layout->addWidget(scrollArea);
scrollArea->setWidget(groupBox);
this->setLayout(layout);
this->resize(1000,600);
QVBoxLayout *vLayout = new QVBoxLayout(parent);
QGroupBox *groupBox = new QGroupBox();
QListWidget *list = new QListWidget();
for()
{
list->setViewMode(QListView::ListMode);
list->setIconSize(QSize(500,500));
list->setResizeMode(QListView::Adjust);
list->addItem(new QListWidgetItem(QIcon(filename),filename));
}
vLayout->addWidget(list);
groupBox->setLayout(vLayout);
scrollArea = new QScrollArea(this);
QVBoxLayout *layout = new QVBoxLayout(parent);
layout->addWidget(scrollArea);
scrollArea->setWidget(groupBox);
this->setLayout(layout);
this->setSizePolicy(QSizePolicy::Expanding, QSizePolicy::Fixed);
this->resize(1000,600);
To copy to clipboard, switch view to plain text mode
Bookmarks