From kde-devel Wed Jul 22 13:48:20 2009 From: Sebastian =?iso-8859-1?q?Tr=FCg?= Date: Wed, 22 Jul 2009 13:48:20 +0000 To: kde-devel Subject: Re: Need Qt painting internals help with my Message-Id: <200907221548.20397.trueg () kde ! org> X-MARC-Message: https://marc.info/?l=kde-devel&m=124827056626111 On Wednesday 22 July 2009 14:53:23 Thomas Lübking wrote: > Am Wednesday 22 July 2009 schrieb Sebastian Trüg: > > It works very nicely on "normal" widgets. It. however, fails on > > listviews. If installed on the view itself or the viewport, the content > > will not be painted anymore. I suspect it has something to do with the > > view painting directly on the viewport. But I was not able to find the > > problem and would appreciate any input. > > > > The interesting method is KPixmapSequenceOverlayPainter::eventFilter. > > obj->event( event ); > d->paintFrame(); > return true; > > that ignores the stuff that is itself being painted by an eventfilter > (behind yours in the chain) > > -> (i do this with the KUrlNavigator breadcrumbs, works w/o problem since a > month or so) > > obj->removeEventFilter(this); // don't recurse... > QCoreApplication::sendEvent(obj, event); > d->paintFrame(); > obj->installEventFilter(this); // catch on... > return true; // we paint above everything > > issue: eventfilters that paint /before/ yours will paint twice. as the > widget will be erased (you send a complete repaint) that's no visual > problem but might impact speed (if it's an expensive operation) thanks a lot. This seems to solve the problem. :) Cheers, Sebastian >> Visit http://mail.kde.org/mailman/listinfo/kde-devel#unsub to unsubscribe <<