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

Svg visibility inheritance gets overridden

    XMLWordPrintable

Details

    • Bug
    • Resolution: Unresolved
    • P2: Important
    • None
    • 5.12.0
    • SVG Support
    • None

    Description

      The Qt SVG renderer/parser somewhere messes up with inheritance.

       

      Given following svg image:

      <svg height="400" width="200">
      <g visibility="hidden">
      <rect x="10" y="10" width="100" height="100" fill="purple" />
      <rect visibility="visible" x="10" y="120" width="100" height="100" fill="red" />
      <rect x="10" y="230" width="100" height="100" fill="blue" />
      <rect x="10" y="340" width="100" height="100" fill="orange" />
      </g>
      </svg>
      

      The "visibility" property/attribute is inherited, but can be overridden for each child separately.

      As for the SVG above, the complete group is hidden, except for the red rectangle.

       

      https://jsfiddle.net/3v9cmo8k/1/

       

      But in Qt, the SVG renders it differently: From the moment the visibility parameter is overridden, all following children are affected too.

       

      See screenshot, opened the SVG above in the SvgViewer Qt Example

      Attachments

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

        Activity

          People

            matthias_rauter Matthias Rauter
            bartel Bartel Eerdekens
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

            Dates

              Created:
              Updated:

              Gerrit Reviews

                There are no open Gerrit changes