hi,
i have a widget called gBAttribute on a MainWindow called configWindow and i want to change it's layout to a VBoxLayout which is returned by the function aart::getEigenschaftenEdit(this) First i had not read the f** manual and tried to do that without deleting the current layout:
Qt Code:
  1. this->gBAttribute->setLayout(aart.getEigenschaftenEdit(this));
To copy to clipboard, switch view to plain text mode 
this gave me the following error:
Qt Code:
  1. Attempting to add QLayout "" to ConfigWindow "ConfigWindow", which already has a layout.
  2. QWidget::setLayout() : Attempting to add QLayout "" to QGroupBox "gBAttribute", which already has a layout
To copy to clipboard, switch view to plain text mode 
so i added some code to delete the current layout before:
Qt Code:
  1. QLayout * ql = this->gBAttribute->layout();
  2. if (ql) {
  3. delete ql;
  4. }
  5. this->gBAttribute->setLayout(aart.getEigenschaftenEdit(this));
To copy to clipboard, switch view to plain text mode 
now console only tells me
Qt Code:
  1. Attempting to add QLayout "" to ConfigWindow "ConfigWindow", which already has a layout
To copy to clipboard, switch view to plain text mode 
does deleting the layout of one widget mean i have to redo all layouts of the parents ???