title: How to display text over image in Qt?
body: <p>I am new to Qt, I am having a label with its background image. The background image displays fine but not able to display over the image. How to do it? Guide me. Refer below my code how I implemented:</p>
  
  <pre><code>QImage image("sample.bmp");
  myLabel-&gt;setPixmap(QPixmap::fromImage(image));
  myLabel-&gt;setGeometry(10,10,78,78);
  </code></pre>
  
  <p>I tried the <code>QPalette</code> to display text , but if i use <code>QPalette</code> only text is showing, image is not showing. I tried the <code>QPalette</code> this way:</p>
  
  <pre><code>QPalette sample_palette;
  sample_palette.setColor(QPalette::Window, Qt::white);
  sample_palette.setColor(QPalette::WindowText, Qt::blue);
  
  myLabel-&gt;setAutoFillBackground(true);
  myLabel-&gt;setPalette(sample_palette);
  myLabel-&gt;setText("What ever text");
  </code></pre>