Thanks, that worked - but now I have another error

QWidget::setLayout: Attempting to set QLayout "" on grid "grid", which already has a layout on the same line