title: QLabel show command opens new Window
body: <p>I've created an Application which derives from QWidget. When I create an <strong>QLabel</strong> and yield the show command, it opens in a separate window. I was deriving my BaseClass from QMainWindow before which worked fine.</p>
  
  <p><img src="https://i.stack.imgur.com/ua4w8.png" alt="screenshot"></p>
  
  <pre><code>#include "widget.h"
  #include "ui_widget.h"
  #include &lt;iostream&gt;
  #include &lt;QDebug&gt;
  
  Widget::Widget(QWidget *parent) :
      QWidget(parent),
      ui(new Ui::Widget)
  {
      ui-&gt;setupUi(this);
  
      testlabel = new my_qlabel(parent);
  
      QImage myImage = QImage(QString::fromStdString("D:/Lighthouse.jpg"));
      testlabel-&gt;setParent(parent);
      testlabel-&gt;name="testName";
      testlabel-&gt;setPixmap(QPixmap::fromImage(myImage, Qt::AutoColor));
      testlabel-&gt;setGeometry(QRect(500, 500, 100, 100));
      testlabel-&gt;show();
      std::cout&lt;&lt;"i am in the output "&lt;&lt;std::endl;
      qDebug() &lt;&lt; QString("init");
  }
  
  Widget::~Widget()
  {
      delete ui;
  }
  </code></pre>