Astronomy
25th June 2012, 20:50
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
static const QPointF points[4] = {
QPointF(10.0, 80.0),
QPointF(20.0, 10.0),
QPointF(80.0, 30.0),
QPointF(90.0, 70.0)
};
QPainter p;
p.begin(this);
p.setPen(Qt::black);
p.drawPolygon(points, 4);
p.end();
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
static const QPointF points[4] = {
QPointF(10.0, 80.0),
QPointF(20.0, 10.0),
QPointF(80.0, 30.0),
QPointF(90.0, 70.0)
};
QPainter p;
p.begin(this);
p.setPen(Qt::black);
p.drawPolygon(points, 4);
p.end();