Details
-
Bug
-
Resolution: Out of scope
-
P3: Somewhat important
-
4.3.0
-
None
Description
QWiazrdPage is possible to shrink to small size if content is added to page after page is added to QWizard.
Reproducible with with Qt 4.3.0.rc1 on Windows:
QWizard * wizard = new QWizard;
QWizardPage * page = new QWizardPage;
//adding the page before the rest of the content is inserted makes it possible to shrink the page to 0 size and
wizard->addPage(page);
wizard->show();
page->setTitle("Introduction");
QLabel *label = new QLabel("This wizard will display Super Bug One! This text is very log too" );
label->setWordWrap(true);
QVBoxLayout *layout = new QVBoxLayout;
layout->addWidget(label);
page->setLayout(layout);
QHBoxLayout *hbox;
QLabel *lbl;
hbox = new QHBoxLayout;
layout->addLayout( hbox );
lbl = new QLabel( "This is row 1: " );
hbox->addWidget( lbl );
lbl = new QLabel;
lbl->setWordWrap( true );
lbl->setSizePolicy( QSizePolicy::Minimum, QSizePolicy::Minimum );
lbl->setText( "This is a very long text inserted into a QLabel. "
"If you resize the wizard to a small size the text "
"will be mangeled! This is not the case for other "
"non-QWizard-dialogs." );
hbox->addWidget( lbl, 2 );
hbox = new QHBoxLayout;
layout->addLayout( hbox );
lbl = new QLabel( "This is row 2: " );
hbox->addWidget( lbl );
layout->addStretch( 2 );
//but adding the page here makes it NOT possible to shrink to 0
//wizard->addPage(page);
// wizard->show();
return app.exec();
Attachments
Issue Links
- resulted from
-
QTBUG-3396 QWizard do not always respect minimumSizeHint() of its content
-
- Open
-