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

QSvgRenderer doesnt fully support Qt::AspectRatioMode

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Unresolved
    • Icon: Not Evaluated Not Evaluated
    • None
    • 6.9.3, 6.10.0
    • SVG Support
    • None
    • Windows & Linux
    • All

      QSvgRenderer only supports IgnoreAspectRatio  and KeepAspectRatio, while lacking support for KeepAspectRatioByExpanding

       

      While it would be great if KeepAspectRatioByExpanding could be supported, in the meantime a qWarning should be triggered when setAspectRatio is called with KeepAspectRatioByExpanding.

      While it is documented that only the two are supported, I did not bother to read that section of the docs, since its also available in QSize and other "resize" functionality.  

      When my images were not showing up properly, I was able to chase it down to the setAspectRatio function in the Svg Renderer.

      A simple qWarning would have made this issue clear

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

            hatemelkharashy Hatem ElKharashy
            scottbloom Scott
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

              Created:
              Updated:

                There are no open Gerrit changes