title: How to set QLabel using setPixmap from pointer QImage *image?
body: <p>i am trying to run two threads. One is the non-Gui thread and the other one is the GUI thread. Now, when i am trying to put the image in the QLabel using the command<br>
   <code>imageLabel-&gt;setPixmap(QPixmap::fromImage(image));</code><br>
   then i get an error:<strong>QPixmap: It is not safe to use pixmaps outside the GUI thread</strong>.</p>
  
  <p>So, to deal with the above mentioned problem. I have declared <code>QImage *image;</code> in my header file and i get my image from msg into *image  using <code>image = new QImage(&amp;(msg-&gt;data[0]), msg-&gt;width, msg-&gt;height, QImage::Format_RGB888);</code>and then i want to set my image in the <strong>QLabel</strong> from this pointer. But i don't understand, <strong>what format of setPixmap should be used</strong> now. 
  The usual code                       <code>imageLabel-&gt;setPixmap(QPixmap::fromImage(image));</code>is not working now as <code>QImage *image</code> is pointer of type.</p>
  
  <p>So, basically i am trying to do the following:-</p>
  
  <pre><code>QImage *image; //in header file
  QLabel *imageLabel: //in header file
  
  image = new QImage(&amp;(msg-&gt;data[0]), msg-&gt;width, msg-&gt;height, QImage::Format_RGB888);
  imageLabel-&gt;setPixmap(QPixmap::fromImage(???????));
  </code></pre>