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

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

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Duplicate
    • Icon: P2: Important 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.

      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);

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

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

              Created:
              Updated:
              Resolved:

                There are no open Gerrit changes