Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • Users
  • Groups
  • Search
  • Get Qt Extensions
  • Unsolved
Collapse
Brand Logo
  1. Home
  2. Qt Development
  3. QML and Qt Quick
  4. QSVGRenderer - subclassing & replacing with custom renderer possible?
Forum Updated to NodeBB v4.3 + New Features

QSVGRenderer - subclassing & replacing with custom renderer possible?

Scheduled Pinned Locked Moved Solved QML and Qt Quick
3 Posts 2 Posters 302 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.
  • M Offline
    M Offline
    m2dtkast
    wrote on 13 Feb 2021, 13:01 last edited by m2dtkast
    #1

    So I was very happy when I noticed there is SVG support in qt \o/ !
    But - rollercoaster, it seems the support is limited to some older standard (2008 /o\
    https://stackoverflow.com/questions/64276963/qt-qml-svg-filters-e-g-fegaussianblur-support-in-qt5-12-and-up )!
    Since we have very fancy designers, who work with alot of effects (for example feGaussianBlur) ,
    their SVGs are very much colorful and plenty of effects are applied.

    Now, of course I can fallback to PNG, but rather not (due to limitations of raster formats).
    So hence the question : can I replace / unplug the default SVG rendering mechanism in qml somehow;
    for example with something like this one :
    https://github.com/cppfw/svgren

    And if so, what would be the best mean to do so?

    1 Reply Last reply
    0
    • S Offline
      S Offline
      SGaist
      Lifetime Qt Champion
      wrote on 13 Feb 2021, 17:07 last edited by
      #2

      Hi,

      If you can generate something that you can put in a QImage, you could create a custom image provider for your QML application.

      The other option is to create your own Qt image format plugin to load these SVG files using the tools you want.

      Interested in AI ? www.idiap.ch
      Please read the Qt Code of Conduct - https://forum.qt.io/topic/113070/qt-code-of-conduct

      1 Reply Last reply
      0
      • M Offline
        M Offline
        m2dtkast
        wrote on 13 Feb 2021, 20:51 last edited by
        #3

        Thanks, as a reference, ill add here
        https://doc.qt.io/qt-5/qtimageformats-index.html

        1 Reply Last reply
        0

        1/3

        13 Feb 2021, 13:01

        • Login

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