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

A QLabel with word wrapped text gets clipped

    XMLWordPrintable

Details

    Description

      Having a QLabel with text that is word wrapped into multiple lines gets clipped on Windows when resizing the QWizardPage to a small size.

      This does not seem to happen if the same content is put inside a QWidget instead of a QWizardPage.

      Reproducible with the following example on Windows:

      #include <QtGui>
      
      int main(int argc, char *argv[])
      {
          QApplication app(argc, argv);
       QWizard * wizard = new QWizard;
       QWizardPage * page = new QWizardPage;
       page->setTitle("Introduction");
          QVBoxLayout *layout = new QVBoxLayout;
          page->setLayout(layout);
       QLabel* lbl = new QLabel;
       lbl->setWordWrap( true );
       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." );
       layout->addWidget( lbl );
       wizard->addPage(page);
       wizard->show();
          return app.exec();
      }
      

      Attachments

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

        Activity

          People

            vhilshei Volker Hilsheimer
            admin Administrator
            Votes:
            5 Vote for this issue
            Watchers:
            12 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved:

              Gerrit Reviews

                There are no open Gerrit changes