title: Qt - How to set text on top of QLabel Image
body: <p>I believe QPainter is used, but I can't figure out how to combine the two.  </p>
  
  <pre><code>QLabel* imageLabel = new QLabel();
  QImage image("c://image.png");
  imageLabel-&gt;setPixmap(QPixmap::fromImage(image));
  imageLabel-&gt;setAlignment(Qt::AlignCenter);
  
  QPainter* painter = new QPainter();
  painter-&gt;setPen(Qt::blue);
  painter-&gt;setFont(QFont("Arial", 30));
  painter-&gt;drawText(rect(), Qt::AlignCenter, "Text on Image");
  </code></pre>