Hi,

I'm drawing rects with QPainter. I want to create a tooltip or show a widget, if i hoover with the mouse over the painted rect. The class of QPainter does not seem to have any hoover events.

Any ideas would be welcome.
thanx Astronomy


Qt Code:
  1. static const QPointF points[4] = {
  2. QPointF(10.0, 80.0),
  3. QPointF(20.0, 10.0),
  4. QPointF(80.0, 30.0),
  5. QPointF(90.0, 70.0)
  6. };
  7.  
  8.  
  9. p.begin(this);
  10. p.setPen(Qt::black);
  11. p.drawPolygon(points, 4);
  12. p.end();
To copy to clipboard, switch view to plain text mode