Please nominate your Qt Champions for 2021!

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" "">
    <svg width="100%" height="100%" version="1.1">

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


    With the stylesheet:

    stroke-width: 1;
    stroke: black;
    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