Uploaded image for project: 'Qt'
  1. Qt
  2. QTBUG-689

QWiazrdPage is possible to shrink to small size if content is added after page is added to QWizard

    XMLWordPrintable

Details

    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

          No reviews matched the request. Check your Options in the drop-down menu of this sections header.

          Activity

            People

              bjnilsen Bjørn Erik Nilsen
              admin Administrator
              Votes:
              0 Vote for this issue
              Watchers:
              0 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved:

                Gerrit Reviews

                  There are no open Gerrit changes