title: QLabel not showing up on QOpenGLWidget
body: <p>I have 2 widgets which inherit from base class <code>QOpenGLWidget</code>.</p>
  
  <p>It looks like this:</p>
  
  <ul>
  <li>one of type <code>class ColorWidget : public MainWidget</code></li>
  <li>one of <code>class BWWidget : public MainWidget</code></li>
  <li>with <code>class MainWidget : public QOpenGLWidget</code></li>
  </ul>
  
  <p>I am trying to draw <code>Rectangle</code> on the widgets using mouse events. I have a <code>Rectangle</code> class inherits from <code>QLabel</code>. I am able to draw rectangles on the widget using something like this</p>
  
  <pre><code>void MainWidget::mousePressEvent(QMouseEvent* event)
  {
      if (event-&gt;button() == Qt::LeftButton)
      {
          m_mousePressed = true;
          m_cursorPos = event-&gt;pos();
  
          m_selection.setTopLeft(m_cursorPos);
  
          event-&gt;accept();
          return;
      }
  
      event-&gt;ignore();
  }
  
  void MainWidget::mouseMoveEvent(QMouseEvent* event)
  {
      m_cursorPos = event-&gt;pos();
  
      if (m_mousePressed &amp;&amp; event-&gt;type() == QEvent::MouseMove)
      {
          emit signalMouseMove(m_cursorPos, m_selection.topLeft());
      }
  
      update();
  }
  
  void MainWidget::mouseMovedSlot(const QPoint&amp; currentPos, const QPoint&amp; startingPos)
  {
      m_selection.setTopLeft(startingPos);
      m_selection.setBottomRight(currentPos);
  
      m_item.reset(new Rectangle(this));
      m_item-&gt;show();
      m_item-&gt;render(m_selection);
  }
  </code></pre>
  
  <p>For now, connections are as follows:</p>
  
  <pre><code>connect(widget1, &amp;MainWidget::SignalMouseMove, widget1, &amp;MainWidget::mouseMovedSlot);
  connect(widget1, &amp;MainWidget::SignalMouseMove, widget2, &amp;MainWidget::mouseMovedSlot);
  connect(widget2, &amp;MainWidget::SignalMouseMove, widget1, &amp;MainWidget::mouseMovedSlot);
  connect(widget2, &amp;MainWidget::SignalMouseMove, widget2, &amp;MainWidget::mouseMovedSlot);
  </code></pre>
  
  <p><strong>Problem:</strong></p>
  
  <p>As you can see both the widgets are connected to each other via signal/slots triggerring everytime event occurs on one widget. This leads to synchronized drawing but it creates <code>Rectangle</code>instance for each widget everytime <code>signalMouseMove</code>is emitted.</p>
  
  <p><strong>What do i want</strong></p>
  
  <ul>
  <li><p>Everytime i draw on a widget using mouse it should show up on other widgets as well.</p></li>
  <li><p>Creating only single instance of <code>Rectangle</code> will help me synchronize <code>move</code> and <code>resizing</code> of the rectangle simultaneously on all widgets.</p></li>
  </ul>
  
  <p><strong>What have i done:</strong></p>
  
  <p>I tried to emit a signal on mouse release event passing the <code>Rectangle</code> to show it on other widgets.</p>
  
  <pre><code>void MainWidget::mouseReleaseEvent(QMouseEvent* event)
  {
      m_mousePressed = false;
      emit draw(m_item);
  } 
  
  void MainWidget::showItem(const std::shared_ptr&lt;Rectangle&gt;&amp; item)
  {
      item-&gt;show();
  }
  </code></pre>
  
  <p>And this is how connections are:</p>
  
  <pre><code>connect(widget1, &amp;MainWidget::signalMouseMove, widget1, &amp;MainWidget::mouseMovedSlot);
  connect(widget1, &amp;MainWidget::draw, widget2, &amp;MainWidget::showItem);
  connect(widget2, &amp;MainWidget::signalMouseMove, widget2, &amp;MainWidget::mouseMovedSlot);
  connect(widget2, &amp;MainWidget::draw, widget1, &amp;MainWidget::showItem);
  </code></pre>
  
  <p>The slot <code>showItem</code> is called everytime i draw but it just doesn't show the drawn rectangle on other widget. Not sure what am i missing here.</p>