Some widgets may use exposedRect of style (e.g. QGraphicsWebView) and would fail

if no value was set (the default is 0,0).

Suggestion by Andre Pedralho <andre.pedralho@openbossa.org>.


svn path=/trunk/KDE/kdelibs/; revision=1063546
This commit is contained in:
Adenilson Cavalcanti Da Silva 2009-12-18 19:30:02 +00:00
parent 83c7bf0bd8
commit 53c47204af

View File

@ -51,8 +51,9 @@ void ShadowFake::copyTarget(QGraphicsWidget *target)
QPainter painter(photo);
painter.setCompositionMode(QPainter::CompositionMode_SourceOver);
painter.fillRect(target->rect(), Qt::transparent);
/* Does it need any special initialization for KDE? */
QStyleOptionGraphicsItem style;
//XXX: some widgets follow exposedRect viewport (e.g. QGraphicsWebView)
style.exposedRect = target->boundingRect();
target->paint(&painter, &style, 0);
painter.end();