title: setCentralWidget not declared in scope
body: <pre><code>#include &lt;QtGui&gt;
  #include &lt;QWidget&gt;
  #include "notepad.h"
  
  notepad::notepad()
  {
      textField = new QTextEdit;
      setCentralWidget(textField);
      setWindowTitle(tr("The building of a notepad...."));
  }
  </code></pre>
  
  <p>This is a file of one of my Qt project. There is some error with the setCentralWidget part. The error is that it is not declared in the scope. But I have included the QWidget class under which it gets included. What is the mistake?</p>