> On 24 Mar 2015, at 17:01, Till Oliver Knoll <till.oliver.kn...@gmail.com> 
> wrote:
> 
> But since the QGraphicsPixmapItem is doing the drawing for me, I probably 
> really need to get informed about resolution changes, and replace the pixmaps 
> in the QGraphicsViewItem myself as needed (unless I am overseeing some other, 
> simpler solution here). Or maybe if I would overwrite the 
> QGraphicsPixmapItem::paint() method and use something like the above code... 
> but that would almost defy the reason why I would use a QGraphicsPixmapItem 
> in the first place... (I could derive from QGraphicsItem then directly 
> instead).

This may be an accurate observation on the usefulness of QGraphicsPixmapItem 
when targeting multiple pixel densities. 

To me QGraphicsPixmapItem::paint() looks like the right place to generate a new 
pixmap on demand - you should be able to check if 
painter->device()->devicePixelRatio() has changed since the previous draw call.

Morten

_______________________________________________
Interest mailing list
Interest@qt-project.org
http://lists.qt-project.org/mailman/listinfo/interest

Reply via email to