[Clam-devel] QPainter bug also found! (was: QGV canvas bug resolved?)

David García Garzón david.garcia at upf.edu
Sat Jul 25 02:54:44 PDT 2009


Angelo, i found the last bug to be fixed before the merge. We were blocking QGV 
behaviour as we suspected, but not just for a single event but for any event.

When we changed the widget inheritance from QWidget to QGraphicsView we forgot 
to update some Super-like calls we did in NetCanvas::event() method. Instead 
of calling QNetworkCanvas::event, we still called QWidget::event so any event 
was redirected ignoring QGV overrides. That bug explains most of the QGV 
polstergeists we found during the migration including failing experiments that 
forced us to do some nasty kludges. After changing that, the paint function is 
called just once, the frame is drawn again, the movement stops flickering and 
all seems faster and shiny... 

Still the embeded widgets are missplaced when the container processings are 
out of the view. This is because QGV don't redraw the boxes of the items that 
are outside and the box draw is the function which places the embeded widget. 
We could fix that by replacing them outside the items painting but we can wait 
until the merge, and then just port the embeded widgets to QGWidgetProxy.

So, fix those two bugs, (setting the viewport background and calling 
QGV::event) and we are ready for the merge. :-)


A Divendres, 24 de juliol de 2009 19:17:15, David García Garzón va escriure:
> Angelo, i guess i found a solution to the QGV childs' background issue.
> Just setting the setStylesheet("background-color: transparent") to the
> viewport() instead of the QGraphicsView. Being the menus, embeded widgets,
> scrollbars... childs of the QGV they inherit the transparent background
> color even being toplevel widgets. If we set the background of the viewport
> instead, we get the intended effect (let the background as it was) but the
> other child widgets are kept ok.
>
> I didn't commit because i am working on a newer version of Qt, and maybe it
> doesn't work for yours, so, please test it on your version and commit it
> yourself when you are done.

-- 
David García Garzón
(Work) dgarcia at iua dot upf anotherdot edu
http://www.iua.upf.edu/~dgarcia




More information about the clam-devel mailing list