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

[QML] Image SVG width: handling problems when binding

XMLWordPrintable

      Whenever I use an SVG in an Image element there are problems with the binding.
      A simple testcase:

          Rectangle
          {
              width: 1024
              height: 768
              Image { source: "images/Qt-logo.svg"; fillMode: Image.PreserveAspectFit; anchors.centerIn: parent; width: parent.width / 2}
          }
      

      This testcase semi-works, in that the SVG is resized. It is however resized after converting the SVG to a pixmap. Is it not possible to have the SVG rendered-to-pixmap at a different size? SVG loading is currently completely useless because of this.

      When the width of the parent is not explicitly set more problems occur (does not occur when the parent has an explicit width):

      width: parent.width * 2 //Not resized, drawn at file's normal size
      width: parent.width - 200 //Not resized, drawn at file's normal size
      width: parent.width + 200 //Not resized, drawn at file's normal size
      

      See also QT-3128

        No reviews matched the request. Check your Options in the drop-down menu of this sections header.

            wallison Warwick Allison (closed Nokia identity) (Inactive)
            cvandonderen Casper van Donderen
            Votes:
            1 Vote for this issue
            Watchers:
            1 Start watching this issue

              Created:
              Updated:
              Resolved:

                There are no open Gerrit changes