QGraphicsView using SVG as background

  • Hello all,

    is it possible to use an SVG as background for a graphics view that scales without artefacts?
    Currently, I am using a pngfile as background pixmap for the graphics view. When scaling the view the background gets pixelated.

    I have an SVG with a 100x100 pixel viewport. I want to use this svg as a texture that repeats endlessly in x and y.
    Or does anyone have another idea to solve this?


  • @stvokr

    This svgviewer helps you.

  • @Ni-Sumi

    I also found this example and unfortunately it does not help because they use a pixmap as background brush and not a svg graphic.

  • Override QGraphicsView::drawBackground and draw SVG image using QSvgRenderer.

Log in to reply