[Qt-interest] Rendering artefacts when moving QGraphicsItems

Jason H scorp1us at yahoo.com
Wed Mar 24 16:02:23 CET 2010


Are the parents supposed to clip children?
Maybe you could try a QGraphicsItemGroup? That would encompass the child boundrects as well.


My artifacts are reduced i n 4.6...




----- Original Message ----
From: Andre Somers <andre at familiesomers.nl>
To: Qt-interest <qt-interest at trolltech.com>
Sent: Wed, March 24, 2010 6:50:01 AM
Subject: [Qt-interest] Rendering artefacts when moving QGraphicsItems

Hi,

I noticed what I think is a regression in Qt 4.6.?. At least, I did not 
notice this effect in Qt 4.5. I am using Qt 4.6.2 on Windows XP.

I have a situation where I have some QGraphicsRectItems that have some 
child items that are partly outside the bounds of the original item. 
When I move around the item using drag & drop, I often get rendering 
artefacts in the sense that the parts of the child items that are 
outside the parent item are not properly erased. This leaves a 'trail' 
of leftovers all over the scene if I drag the item around a bit. When 
the graphics view redraws, the artifacts disapear. Note that the parent 
item does not leave a trail.

I have reimplemented the boundingRect method to contain the child items 
( I thought that this would be automatic ), but that did not help. Could 
somebody suggest what I might be doing wrong here?

André
_______________________________________________
Qt-interest mailing list
Qt-interest at trolltech.com
http://lists.trolltech.com/mailman/listinfo/qt-interest



      





More information about the Qt-interest-old mailing list