Qt, SVG, Stylesheets?



  • Simple question: Does the QT SVG implementation support stylesheets? I've tried to following to no avail:

    @<?xml version="1.0" standalone="no"?>
    <?xml-stylesheet href="stylesheet.css" type="text/css"?>
    <!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 1.1//EN" "http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd">
    <svg width="100%" height="100%" version="1.1">

    <circle cx="0" cy="0" r="10"/>

    </svg>@

    With the stylesheet:

    @circle
    {
    stroke-width: 1;
    stroke: black;
    fill:yellow;
    fill-opacity: 0.0;
    }@



  • QtSVG implements SVG Tiny, which does not support CSS styling. Use QtWebKit if you want to render such a SVG file.



  • Thanks for that, I remembered reading something to such an extent but couldn't find it. I even googled for 'SVG lite', 'SVG light', to no avail!


Log in to reply
 

Looks like your connection to Qt Forum was lost, please wait while we try to reconnect.