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. QtSvg rendering without a SVG file ?
Forum Update on Monday, May 27th 2025

QtSvg rendering without a SVG file ?

Scheduled Pinned Locked Moved Solved General and Desktop
4 Posts 2 Posters 221 Views
  • 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.
  • SPlattenS Offline
    SPlattenS Offline
    SPlatten
    wrote on last edited by
    #1

    Can anyone point me to a tutorial on how to use QtSvg to render content without an SVG file?

    In my application I already have XML which defines a lot of how the application works. I have added SVG to the XML file. I have read this SVG in along with the rest of the XML, is there a way to use the QtSvg classes and send the SVG to the classes without reading it from file?

    Thank you,

    1 Reply Last reply
    -1
    • mrjjM Offline
      mrjjM Offline
      mrjj
      Lifetime Qt Champion
      wrote on last edited by
      #2

      Hi
      you can use
      https://doc.qt.io/qt-5/qsvgrenderer.html
      and
      https://doc.qt.io/qt-5/qsvgrenderer.html#QSvgRenderer-2
      which takes a QByteArray with the SVG data

      SPlattenS 1 Reply Last reply
      3
      • SPlattenS Offline
        SPlattenS Offline
        SPlatten
        wrote on last edited by
        #3

        Thank you

        1 Reply Last reply
        0
        • mrjjM mrjj

          Hi
          you can use
          https://doc.qt.io/qt-5/qsvgrenderer.html
          and
          https://doc.qt.io/qt-5/qsvgrenderer.html#QSvgRenderer-2
          which takes a QByteArray with the SVG data

          SPlattenS Offline
          SPlattenS Offline
          SPlatten
          wrote on last edited by
          #4
          This post is deleted!
          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