title: How to derive from a Qt MainWindow class?
body: <p>I have a Qt 4 base class that creates the main application dialog:</p>
  
  <pre><code>class MainWindow : public QMainWindow {
      Q_OBJECT
  public:
      explicit MainWindow(QWidget *parent = 0);
  };
  
  MainWindow::MainWindow(QWidget *parent) : QMainWindow(parent)
  {
      QWidget *central = new QWidget;
      ...
      setCentralWidget(central);
  }
  </code></pre>
  
  <p>I must not touch this code, but I can extend it with a derived class:  </p>
  
  <pre><code>class MyWindow : public MainWindow {
      Q_OBJECT
  public:
      explicit MyWindow(QWidget *parent = 0);
  };
  
  MyWindow::MyWindow(QWidget *parent)
  {
      MainWindow(parent);
      QWidget *myWidget = new QWidget;
      //???
  }
  </code></pre>
  
  <p>I would like to add more widgets to the base class' central widget. How can I do it once <code>setCentralWidget()</code> has already been called in the base class?</p>