title: remove extra widget/window in Qt
body: <p>probably a simple question: I just created a new project in Qt creator and I set it to use QWidget when I created it, now how do I get rid of the window that it automatically creates when I run it? I also created my own QWidget window which I want to be the only window.</p>
  
  <pre><code>#include "widget.h"
  #include &lt;QtGui&gt;
  
  Widget::Widget()
  
  {
      QWidget* window = new QWidget;
      addBtn = new QPushButton("Add Module");
      text = new QTextEdit();
      text-&gt;setReadOnly(true);
      QVBoxLayout* layout = new QVBoxLayout();
      layout-&gt;addWidget(addBtn,5);
      layout-&gt;addWidget(text);
      window-&gt;setLayout(layout);
      window-&gt;show();
  }
  
  Widget::~Widget()
  {
  
  }
  
  #include &lt;QtGui/QApplication&gt;
  #include "widget.h"
  
  int main(int argc, char *argv[])
  {
      QApplication a(argc, argv);
      Widget w;
      w.show();
  
      return a.exec();
  }
  </code></pre>