hello everyone,
i have a little problem and i cand't find the problem.
(all code it's in the constructor of a class that extends QWidget)

mainLayoutBigg = new QGridLayout((QWidget*)this);
mainLayoutSmall = new QGridLayout((QWidget*)this);

mainLayoutBigg->addWidget(qwd_1,...);
mainLayoutBigg->addWidget(qwd_2,...);
mainLayoutBigg->addWidget(qwd_3,...);

mainLayoutSmall->addWidget(qwd_1,...);
mainLayoutSmall->addWidget(qwd_2,...);

this->setLayout(mainLayoutSmall);
delete layout();
this->setLayout(mainLayoutBigg); [COLOR="Red"]<=== here dies ..., more exactly in a QWidget.cpp setParent(this) ---> QObjectPrivate::setParent_helper(QObject *o), parentD->children[index] = 0; because index is -1[/COLOR]

what i'm trying to do is to swich between 2 layouts ... ibut i don;t know that's wrong with the code above. if anyone cand help ...

ps: Qt 4.3.1