Details
-
Bug
-
Resolution: Unresolved
-
P2: Important
-
None
-
5.12.0
-
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