Hi, Consider
``` SomeWidgetClass *a = maybeReturnSomeWidget(); SomeOtherQWidgetClass *b = maybeReturnSomeOtherWidget(); QWidget *combined = new QWidget(); QVBoxLayout *layout = new QVBoxLayout(); layout->addWidget(a); layout->addWidget(b); combined->setLayout(layout); if (doWeLikeItCombined) { return combined; } // get back our widgets layout->removeWidget(a); layout->removeWidget(b); delete combined; // deleteLater()? return a ? a : b; ``` The test on the combined widget looks at its size, which apparently I cannot get reliably from a->height(), b->width() and family directly. I thus need to take back my widgets a and b from the layout and it seems that what I do currently isn't good enough because the code crashes when after I return something other than the combined widget. Is this a catch-22 one can get out of? Thanks, R. _______________________________________________ Interest mailing list Interest@qt-project.org https://lists.qt-project.org/listinfo/interest