initialize the layout as soon as possible, crash--?

svn path=/trunk/KDE/kdelibs/; revision=1036032
This commit is contained in:
Marco Martin 2009-10-16 11:14:46 +00:00
parent 73b6f6be8a
commit 1d611eac34

View File

@ -238,8 +238,8 @@ ScrollWidget::ScrollWidget(QGraphicsWidget *parent)
: QGraphicsWidget(parent),
d(new ScrollWidgetPrivate(this))
{
setSizePolicy(QSizePolicy::Expanding, QSizePolicy::Expanding);
d->layout = new QGraphicsGridLayout(this);
setSizePolicy(QSizePolicy::Expanding, QSizePolicy::Expanding);
d->layout->setContentsMargins(1, 1, 1, 1);
d->scrollingWidget = new QGraphicsWidget(this);
d->layout->addItem(d->scrollingWidget, 0, 0);