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

QLabel setpixmap is creating a pixmap several times larger than the label... (Regression)

    XMLWordPrintable

Details

    • Bug
    • Resolution: Duplicate
    • P2: Important
    • None
    • 5.5.1
    • None
    • Mac OS X El Capitan running Qt Creator 3.5.1 and Qt 5.5.1 open source.

    Description

      This code used to create a label, fill it with a QImage as its pixmap. The resulting pixmap filled the area displayed on screen. Now the pixmap is super-large, and I can only see a fraction of it:

      QLabel *label=new QLabel();
      label->setSizePolicy(QSizePolicy::Expanding, QSizePolicy::Expanding);
      label->setScaledContents(true);
      label->setPixmap(QPixmap::fromImage(QImage(":/Images/3DVideoSplashScreen.jpg")));
      label->setFrameStyle(QFrame::Box);
      this->layout()->addWidget(label);

      Attachments

        Issue Links

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

          Activity

            People

              mmutz Marc Mutz
              drhalftone Daniel Lau
              Votes:
              2 Vote for this issue
              Watchers:
              4 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved:

                Gerrit Reviews

                  There are no open Gerrit changes