Skip to content

Use QQuickPaintedItem to show svg instead of Image

Mikel Johnson requested to merge work/mikel/imagerect into master

Basically Image flickers when we change sourceSize which we need to make svgs not look terrible

This creates a custom element we uses scenegraph to show the image. I'm not really knowledgeable in this topic so it uses a deprecated node, but it should be easy to replace (I couldn't :) (also I had one based on QQuickPaintedItem but it had high memory usage) (also also tried QQuickImageProvider but also caused flicker)

The benefit of this of this approach is that we only draw what is seen, so it's good on memory, but meh on cpu (kind of like Gwenview)

I'm not really determined to finish this(I've worked on this a month ago), so I'm just gonna throw it out, as a way of discussing the feasibility of this approach

this is somewhat inspired by what gwenview does (bad?)

Edited by Mikel Johnson

Merge request reports

Loading