Important: Please read the Qt Code of Conduct - https://forum.qt.io/topic/113070/qt-code-of-conduct

Pixelated gif when used with QMovie



  • I'm trying to show a gif file in QT app, using the approach provided in the link: https://code.qt.io/cgit/qt/qtbase.git/tree/examples/widgets/widgets/movie?h=5.15

    Approach makes use of QMovie object set in a QLabel.

    The example works well and fine.

    But if I enable High DPI scaling for the app, the gif becomes all pixelated. Please see the screenshots below.

    This is the line that I add to enable High DPI scaling.

    QApplication::setAttribute(Qt::AA_EnableHighDpiScaling);
    

    alt text

    alt text

    Any ideas to get this fixed ?

    I have tried the following fixes already:

    setScaledSize for the QMovie object
    setScaledContents(true) for the QLabel
    QT version I'm using is 5.15.2 and platform is Windows.


Log in to reply