Hello Jordi, 

If I increase the size of the rectangle boundingRect returns, it does correctly 
clear that area. But my bounding rectangle is already as large (or just for 
testing, larger than) the actual tooltip.

It also only occurs when I scroll. If I move the mouse (and therefore 
reposition the tooltip) but don't scroll the view at the same time, drawing and 
invalidating happens just as expected. It is only when I scroll that Qt doesn't 
invalidate the the old drawing area. As if the position changes due to 
scrolling aren't taken into account when invalidating the old rect.

~ Jelmer 


On Friday 8 June 2012 at 14:19, Jordi Pujol wrote:

> Hi Jelmer,
> 
> Just a clue, without looking at your code : ensure your tooltip's
> bounding rect is greater than the tooltip itself. I mean ALL the
> tooltip, text and grey-box-background.
> 
> This error appears when you don't take care of this. QGraphicsView only
> invalidates the rect returned by the method you (may) have overloaded in
> your custom class :
> 
> QRectF QGraphicsItem::boundingRect () const
> 
> So first, try to make this QRectF a little bit bigger. Looking at the
> screenshot it seems is smaller than it must...
> 
> J.
> 
> _______________________________________________
> Interest mailing list
> Interest@qt-project.org (mailto:Interest@qt-project.org)
> http://lists.qt-project.org/mailman/listinfo/interest



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

Reply via email to