workaround some qt bug which makes children items disappear when toggling the ItemClipsChildrenToShape flag

svn path=/trunk/KDE/kdelibs/; revision=1029853
This commit is contained in:
Jacopo De Simoi 2009-09-30 22:10:35 +00:00
parent 44c763a752
commit 225cab4ef4

View File

@ -170,7 +170,16 @@ public:
const bool clip = widget->size().width() > scrollingWidget->size().width() || const bool clip = widget->size().width() > scrollingWidget->size().width() ||
widget->size().height() > scrollingWidget->size().height(); widget->size().height() > scrollingWidget->size().height();
scrollingWidget->setFlag(QGraphicsItem::ItemClipsChildrenToShape, clip); /* FIXME: it should really be like this:
*
* scrollingWidget->setFlag(QGraphicsItem::ItemClipsChildrenToShape, clip);
*
* however, a qt bug prevents this to work properly when toggling this flag,
* so we have to keep the children items always clipped (performance--)
* until the bug is fixed.
*/
scrollingWidget->setFlag(QGraphicsItem::ItemClipsChildrenToShape, true);
} }
ScrollWidget *q; ScrollWidget *q;