This seems to work:

Qt Code:
  1. void
  2. DriverView::refreshDriverView() {
  3. body->hide();
  4. mainLayout->removeWidget(body);
  5. body = driverFactory()->driverUserInterface(driverFactory()->currentDriver());
  6. mainLayout->addWidget(body);
  7. body->show();
  8. }
To copy to clipboard, switch view to plain text mode 

Is there anything that speeks against this ?