Details
-
Bug
-
Resolution: Done
-
P2: Important
-
5.5.0, 5.6.0
-
None
Description
I loaded my file called "whatever@2x.gif" into QMovie, then set this as the movie on a QLabel.
The movie is displayed correctly respecting the devicePixelRatio == 2.0, but the QLabel is twice as big as it needs to be. There's empty space around the actual animation.
If I check my movie.currentPixmap().devicePixelRatio() it is correct.
I see in qlabel.cpp that QLabelPrivate::sizeForWidth() does not use the devicePixelRatio of the movie frames as it does for a pixmap set directly on the label.
Workaround: set the label to have a fixed size of movie.currentPixmap().size() / movie.currentPixmap().devicePixelRatio().
Attachments
Issue Links
- is duplicated by
-
QTBUG-52184 QLabel setMovie bug
- Closed
For Gerrit Dashboard: QTBUG-48157 | ||||||
---|---|---|---|---|---|---|
# | Subject | Branch | Project | Status | CR | V |
175974,5 | QLabel: take DPR of QMovie in account when calculating sizeHint | 5.6 | qt/qtbase | Status: MERGED | +2 | 0 |