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. QSvgWidget - problem with some SVG files
Forum Updated to NodeBB v4.3 + New Features

QSvgWidget - problem with some SVG files

Scheduled Pinned Locked Moved Unsolved General and Desktop
3 Posts 2 Posters 392 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.
  • D Offline
    D Offline
    dunschc
    wrote on last edited by
    #1

    Hi, I use the QSvgWidget to display SVG files.

    But sometimes a SVG file is not shown in correct way.

    Inkscape, all picture-viewers based on gnome (shotwell, pix, gThumb, geeqie, eog, mirage, ristretto, pqiv, viewnior, qiv) and the QWebEngineView have no trouble to show the correct SVG.

    QSvgWidget and all image-viewer based on QT (lximage-qt, phototonic, nomacs, showfoto, gwenview and xnviewmp) have problme to show the SVG in correct way.

    SVG_example.jpg

    Left side is QT with lximage-qt, right side is eog.

    Same is with systemd-analyze plot > start.svg command:
    start.jpg

    What do we need to make SVG files look like they should do?

    (Sorry I am not able to upload the SVG file itself, please let me know how to do...)

    Christian EhrlicherC 1 Reply Last reply
    0
    • D dunschc

      Hi, I use the QSvgWidget to display SVG files.

      But sometimes a SVG file is not shown in correct way.

      Inkscape, all picture-viewers based on gnome (shotwell, pix, gThumb, geeqie, eog, mirage, ristretto, pqiv, viewnior, qiv) and the QWebEngineView have no trouble to show the correct SVG.

      QSvgWidget and all image-viewer based on QT (lximage-qt, phototonic, nomacs, showfoto, gwenview and xnviewmp) have problme to show the SVG in correct way.

      SVG_example.jpg

      Left side is QT with lximage-qt, right side is eog.

      Same is with systemd-analyze plot > start.svg command:
      start.jpg

      What do we need to make SVG files look like they should do?

      (Sorry I am not able to upload the SVG file itself, please let me know how to do...)

      Christian EhrlicherC Offline
      Christian EhrlicherC Offline
      Christian Ehrlicher
      Lifetime Qt Champion
      wrote on last edited by Christian Ehrlicher
      #2

      @dunschc said in QSvgWidget - problem with some SVG files:

      What do we need to make SVG files look like they should do?

      Make sure to use only the features from svg which qt supports.

      Qt Online Installer direct download: https://download.qt.io/official_releases/online_installers/
      Visit the Qt Academy at https://academy.qt.io/catalog

      D 1 Reply Last reply
      1
      • Christian EhrlicherC Christian Ehrlicher

        @dunschc said in QSvgWidget - problem with some SVG files:

        What do we need to make SVG files look like they should do?

        Make sure to use only the features from svg which qt supports.

        D Offline
        D Offline
        dunschc
        wrote on last edited by dunschc
        #3

        @Christian-Ehrlicher

        Sorry, that not possible for me. Neither systemd-analyze nor PyMuPDF get_svg_image function (https://pymupdf.readthedocs.io/en/latest/page.html#Page.get_svg_image) are able to strip down SVG output to a QT compatibility level...

        When there is no other possibility, I think I have to change toolkit or wait until QT will adopt more SVG functionality some day.

        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