title: [Qt 5.6][QPixmap] Getting "black picture with colored pixels" in QLabel when setting a QPixmap in it
body: <p>(Using Visual Studio Community 2015, Qt 5.6.0)</p>
  
  <p>For training purposes, I'm trying to display a RGB QPixmap through a QLabel using signals and slots events. (to display a sort of color preview)</p>
  
  <p>For this, I added three sliders for each value (r, g and b). When I update for example the red slider, it is supposed to generate a new QPixmap with the color values then put it into a QLabel, like this :</p>
  
  <pre><code>void                Application::updateColorLabel(int value) {
      int             r, g, b;
      QPixmap         pixmap;
      QColor          color;
  
      this-&gt;ui.label_minValueR-&gt;setNum(value);
      pixmap = QPixmap(this-&gt;ui.label_color_preview-&gt;size());
      r = this-&gt;ui.label_minValueR-&gt;text().toInt();
      g = this-&gt;ui.label_minValueG-&gt;text().toInt();
      b = this-&gt;ui.label_minValueB-&gt;text().toInt();
      color = QColor(r, g, b);
      this-&gt;ui.label_color_preview-&gt;setPixmap(pixmap);
  }
  </code></pre>
  
  <p>It doesn't work very well, since I get a black QLabel with few colored pixels, like <a href="http://i.stack.imgur.com/yD4y2.png" rel="nofollow">this</a>. I don't really know why it displays this.</p>
  
  <p>Can someone figure it out with me, please ?</p>