https://bugs.kde.org/show_bug.cgi?id=359500
Bug ID: 359500
Summary: KCollapsibleGroupBox expands beyond maximum window
size
Product: frameworks-kwidgetsaddons
Version: unspecified
Platform: Other
URL: http://pastebin.com/wVArN6Ju
OS: other
Status: UNCONFIRMED
Severity: normal
Priority: NOR
Component: general
Assignee: [email protected]
Reporter: [email protected]
CC: [email protected]
If a QAbstractScrollArea widget in KCollapsibleGroupBox has a huge sizeHint()
[simulated here with
QAbstractScrollArea::setSizeAdjustPolicy(QAbstractScrollArea::AdjustToContents)
] it will still try to fit it all expanding beyond screen size.
Reproducible: Always
Steps to Reproduce:
Formatted paste of the code attached as link
#include <QApplication>
#include <KCollapsibleGroupBox>
#include <QStandardItemModel>
#include <QTableView>
#include <QLabel>
#include <QVBoxLayout>
int main(int argc, char *argv[])
{
QApplication a(argc, argv);
QWidget mainWid;
QStandardItemModel* model=new QStandardItemModel(&mainWid);
model->insertColumns(0, 4);
model->insertRows(0, 100);
QTableView* view = new QTableView(&mainWid);
view->setSizeAdjustPolicy(QTableView::AdjustToContents);
view->setModel(model);
KCollapsibleGroupBox* testGroup = new KCollapsibleGroupBox(&mainWid);
testGroup->setTitle("Collapse");
QLabel* testlabel = new QLabel(&mainWid);
testlabel->setText("Test");
QVBoxLayout* collapsibleLay = new QVBoxLayout(testGroup);
collapsibleLay->addWidget(view);
QVBoxLayout* mainLay = new QVBoxLayout(&mainWid);
mainLay->addWidget(testlabel);
mainLay->addWidget(testGroup);
mainWid.show();
return a.exec();
}
Actual Results:
view will expand beyond screen size
Expected Results:
view will expand up to the maximum size allowed by the containing widget and
use the scrollarea
Qt 5.5.1
Windows 7 32 bit
--
You are receiving this mail because:
You are watching all bug changes.