[Interest] How to render small Images decently on non retina displays with QtQuick?

Uwe Rathmann Uwe.Rathmann at tigertal.de
Thu Mar 15 20:05:29 CET 2018

On Thu, 15 Mar 2018 14:17:00 +0000, Shawn Rutledge wrote:

> That sounds interesting.  What format do you want to precompile them to?

Well, as all we need is to restore the members of a class exactly, like 
they have been in memory, before we wrote them to disk, there should be a 
way to do this without having to write a parser.

But this is all I have to offer so far. The idea of using mmap exists 
since the very beginning of our project, but as we already have no 
performance issues with how we load the images today it has a low 

The format we are using today can be found here: https://github.com/

To be complete I also implemented embedded QImage/QPixmap, but in reality 
we only have QPainterPath vector data and state change informations - 
both stored stored in a QVector. Beside that there is some Meta Data 
( supporting proper layouting of scaled vector graphics ) - so all in all 
it should be doable.


Unfortunately Qt development never really saw much potential in using 
vector graphic formats for writing user interfaces. It was never a first 
class citizen for widgets, but with Qt/Quick the idea totally got lost, 
as the one-window-always-in-fullscreen use case has become dominant.

I remember, that there once was a page ( maybe it is still there, but I 
can't find it ) in the Qt documentation, that explicitly mentioned the 
combination of Layouts and SVG as solution for writing scalable user 

But IIRC SVGs do not even exist in the complete Qt/Quick API and the thin 
layer ( a.k.a Qt/Quick Layouts ) on top of QGridLayoutEngine does not 
even forward the available features ( f.e dynamic constraints ) of this 
powerful class to the user.

If you like you can compare it with the layout system I have implemented 
on top of the same engine: https://github.com/uwerat/qskinny/tree/master/
src/layouts. It is more or less the same, what the widget layouts offer + 
a couple of extras I always missed in the past when using them.


More information about the Interest mailing list