Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • Users
  • Groups
  • Search
  • Get Qt Extensions
  • Unsolved
Collapse
Brand Logo
  1. Home
  2. Qt Development
  3. General and Desktop
  4. Qt, SVG, Stylesheets?
Qt 6.11 is out! See what's new in the release blog

Qt, SVG, Stylesheets?

Scheduled Pinned Locked Moved General and Desktop
3 Posts 2 Posters 4.6k Views 1 Watching
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • L Offline
    L Offline
    LiamMaru
    wrote on last edited by
    #1

    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;
    }@

    1 Reply Last reply
    0
    • D Offline
      D Offline
      dangelog
      wrote on last edited by
      #2

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

      Software Engineer
      KDAB (UK) Ltd., a KDAB Group company

      1 Reply Last reply
      0
      • L Offline
        L Offline
        LiamMaru
        wrote on last edited by
        #3

        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!

        1 Reply Last reply
        0

        • Login

        • Login or register to search.
        • First post
          Last post
        0
        • Categories
        • Recent
        • Tags
        • Popular
        • Users
        • Groups
        • Search
        • Get Qt Extensions
        • Unsolved