Bug 359500 - KCollapsibleGroupBox expands beyond maximum window size
Summary: KCollapsibleGroupBox expands beyond maximum window size
Status: RESOLVED WORKSFORME
Alias: None
Product: frameworks-kwidgetsaddons
Classification: Frameworks and Libraries
Component: general (other bugs)
Version First Reported In: unspecified
Platform: Compiled Sources All
: NOR normal
Target Milestone: ---
Assignee: Christoph Feck
URL: http://pastebin.com/wVArN6Ju
Keywords:
Depends on:
Blocks:
 
Reported: 2016-02-17 13:55 UTC by luca.beldi
Modified: 2022-12-06 05:18 UTC (History)
1 user (show)

See Also:
Latest Commit:
Version Fixed/Implemented In:
Sentry Crash Report:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description luca.beldi 2016-02-17 13:55:30 UTC
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
Comment 1 Justin Zobel 2022-11-06 09:25:13 UTC
Thank you for reporting this issue in KDE software. As it has been a while since this issue was reported, can we please ask you to see if you can reproduce the issue with a recent software version?

If you can reproduce the issue, please change the status to "REPORTED" when replying. Thank you!
Comment 2 Bug Janitor Service 2022-11-21 05:12:18 UTC
Dear Bug Submitter,

This bug has been in NEEDSINFO status with no change for at least
15 days. Please provide the requested information as soon as
possible and set the bug status as REPORTED. Due to regular bug
tracker maintenance, if the bug is still in NEEDSINFO status with
no change in 30 days the bug will be closed as RESOLVED > WORKSFORME
due to lack of needed information.

For more information about our bug triaging procedures please read the
wiki located here:
https://community.kde.org/Guidelines_and_HOWTOs/Bug_triaging

If you have already provided the requested information, please
mark the bug as REPORTED so that the KDE team knows that the bug is
ready to be confirmed.

Thank you for helping us make KDE software even better for everyone!
Comment 3 Bug Janitor Service 2022-12-06 05:18:50 UTC
This bug has been in NEEDSINFO status with no change for at least
30 days. The bug is now closed as RESOLVED > WORKSFORME
due to lack of needed information.

For more information about our bug triaging procedures please read the
wiki located here:
https://community.kde.org/Guidelines_and_HOWTOs/Bug_triaging

Thank you for helping us make KDE software even better for everyone!