title: Draw Text on QCustomPlot
body: <p>I have a problem with drawing text on <code>QCustomPlot</code> widget. A have a several graphs in my widget and each of them carry the information about amplitude in its name. A would like to display that text when the user clicks on graph at the position of cursor. I have this code but its not working although when I enable MessageBox, value displays well:</p>
  
  <pre><code>QCustomPlot *nahlad; //graph
  connect(nahlad,    SIGNAL(plottableClick(QCPAbstractPlottable*,QMouseEvent*)), 
     this, SLOT(kliknutieNaGraf(QCPAbstractPlottable*,QMouseEvent*)));
  ...   
  
  void resultWindow::kliknutieNaGraf(QCPAbstractPlottable *a, QMouseEvent *b) 
  {
      QPainter *paint = new QPainter(); paint-&gt;drawText( QPoint(b-&gt;x(),b-&gt;y()), 
          QString("Amplituda je: %1").arg(a-&gt;name()) );
      //QMessageBox::about(NULL, QString("Info"), QString("%1").arg(a-&gt;name()));
  }
  </code></pre>