0

Image element of the QtQuick supports HiDPI images automatically as you know. For example it can loads @2x images in the iOS and MacOS platforms. Same code works OK on the Android platform.
There is a section in the official documentation that talked about network transparency.
But the Image element doesn't loads HiDPI version images from my server.

Is this a bug?
How can I handle this problem to load high dpi images? Is there any official suggested way?

import QtQuick 2.9
import QtQuick.Window 2.3
import QtQuick.Layouts 1.3

Window {
    visible: true
    width: 900
    height: 520
    Image {
        id: img
        z: 10000
        source: "http://127.0.0.1:8080/images/banner-1.jpg" //<-- not loads @2x version automatically
        width: 320; height: 205  //<-- also I need to specify a size otherwise it will be so big
    }
}

Thank you

S.M.Mousavi
  • 5,013
  • 7
  • 44
  • 59

0 Answers0