Uploaded image for project: 'Qt'
  1. Qt
  2. QTBUG-79647

SVG QIcon rendered to SVG gets rasterized

    XMLWordPrintable

Details

    • Suggestion
    • Resolution: Unresolved
    • Not Evaluated
    • None
    • None
    • SVG Support
    • None

    Description

      I want to export a table/tree/... widget to SVG and use QWidget::render for that on a painter on a QSvgGenerator. Many parts are rendered nicely scalable but not so the expanded icon. Here is a screenshot from the SVG as opened in Inkscape:

      So, my idea was to replace the standard icon with a SVG icon but I found out that QIcon does in no way support rendering to vector scalable outputs. My source codes are attached. Here is the zoomed screenshot of the exported SVG when the expand icon was replaced with a circle and another QIcon was rendered below Child 1:

      This is what I would expect the zoomed output in inkscpae to look like:

      Attachments

        1. circle.svg
          1.0 kB
        2. main.cpp
          1 kB
        3. qmake.pro
          0.1 kB
        4. resources.qrc
          0.1 kB
        5. Selection_204.png
          Selection_204.png
          9 kB
        6. Selection_205.png
          Selection_205.png
          23 kB
        7. Selection_206.png
          Selection_206.png
          17 kB
        8. table.svg
          10 kB
        No reviews matched the request. Check your Options in the drop-down menu of this sections header.

        Activity

          People

            Unassigned Unassigned
            uiohbgq uiohbgq
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

            Dates

              Created:
              Updated:

              Gerrit Reviews

                There are no open Gerrit changes