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

Document that @2x @3x @4x image loading is supported also on Android

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Done
    • Icon: P2: Important P2: Important
    • 5.15.1, 6.0.0 RC
    • 5.11.0 Beta 3
    • Documentation
    • None

      Documentation at https://doc.qt.io/qt-5/scalability.html states that:

      "On macOS and iOS, you can provide alternative resources with double the size and the @2x identifier for icons and images and place them in the resource file. On Retina displays, the @2x versions are used automatically."

      Documentation recommends doing this:

      Image {
          source: {
              if (Screen.PixelDensity < 40)
              "image_low_dpi.png"
              else if (Screen.PixelDensity > 300)
              "image_high_dpi.png"
              else
              "image.png"
              }
          }
      }

      I tested on my Android devices and @2x images do get loaded using qml Image. I think it's important to clearly state what the supported and recommended way of loading multiresolution images really is.

        For Gerrit Dashboard: QTBUG-67806
        # Subject Branch Project Status CR V

            treinio Topi Reiniö
            flaviotordini Flavio Tordini
            Santtu Ahonen Santtu Ahonen
            Rami Potinkara Rami Potinkara
            Votes:
            2 Vote for this issue
            Watchers:
            7 Start watching this issue

              Created:
              Updated:
              Resolved:

                There are no open Gerrit changes