title: A simple subclass of QWidget doesn't work as a QWidget
body: <p><strong>I create a very simple subclass of QWidget like this:</strong></p>
  
  <pre><code>class WorldView : public QWidget
  {
      Q_OBJECT
  public:
      explicit WorldView(QWidget *parent = 0);
  
  signals:
  
  public slots:
  };
  
  WorldView::WorldView(QWidget *parent) : QWidget(parent)
  {
  
  }
  </code></pre>
  
  <p><strong>I create an instance of it in main window like this:</strong></p>
  
  <pre><code>class MainWindow : public QMainWindow
  {
      Q_OBJECT
  
  public:
      explicit MainWindow(QWidget *parent = 0);
      ~MainWindow();
  
  protected:
      virtual void resizeEvent(QResizeEvent* event) override;
  
  private:
      WorldView* _worldView;
  };
  
  MainWindow::MainWindow(QWidget *parent) :
      QMainWindow(parent)
  {
      _worldView = new WorldView(this);
      _worldView-&gt;setStyleSheet(QString("* {background-color : black}"));
  }
  
  MainWindow::~MainWindow()
  {
      delete _worldView;
  }
  
  void MainWindow::resizeEvent(QResizeEvent *event)
  {
      _worldView-&gt;resize(size());
  }
  </code></pre>
  
  <p>But the widget does not show as expected.</p>
  
  <p>I have tried to call <code>show()</code>, but it still doesn't show.</p>
  
  <p>The weird thing is that when I replace <code>WorldView</code> with <code>QWidget</code>, the widget shows.</p>
  
  <p>I don't know why.</p>