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

Quick Image and SVG does not set proper devicePixelRatio which leads to blurry retina images.

XMLWordPrintable

    • iOS/tvOS/watchOS
    • 428b92583ee2102c7ef16776a9b7785df7ff4e2c

      If I patch this into the Qt source (qquickimagebase.cpp), it works nicely:

       
              resolve2xLocalFile(d->url, targetDevicePixelRatio, &loadUrl, &d->devicePixelRatio);
      	if (d->url.path().contains("svg")) {
      		qDebug() << Q_FUNC_INFO << d->url << targetDevicePixelRatio << loadUrl << d->devicePixelRatio;
      		d->devicePixelRatio = targetDevicePixelRatio;
      	}
              d->pix.load(qmlEngine(this), loadUrl, d->sourcesize * d->devicePixelRatio, options);
      

      My suggestion would be that SVG always allows the targetDevicePixelRatio.

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

            sorvig Morten Sørvig
            mgoetz2 Markus Goetz (Woboq GmbH)
            Votes:
            14 Vote for this issue
            Watchers:
            13 Start watching this issue

              Created:
              Updated:
              Resolved:

                There are no open Gerrit changes