Sir, this is my code:-
in .h file
public:
QImage pixx
(":/Images/AlarmEvent.png");
painter->drawImage(r,pixx);
}
};
class Marker:public QwtPlotMarker{
public:
virtual void drawLabel(QPainter *painter, const QRectF &, const QPointF &pt) const{
painter=new QPainter;
QImage pixx(":/Images/AlarmEvent.png");
QRectF r(1,1,10,10);
painter->drawImage(r,pixx);
}
};
To copy to clipboard, switch view to plain text mode
in .cpp file
Marker *mark;
mark=new Marker;
mark->setValue(xData_1.at(0),yData_1.at(0));//this is where i want to place the marker.
mark->attach(plot);
Marker *mark;
mark=new Marker;
mark->setValue(xData_1.at(0),yData_1.at(0));//this is where i want to place the marker.
mark->attach(plot);
To copy to clipboard, switch view to plain text mode
Sir, it is not showing any label on the marker. Why is this happening? Is something wrong in the code? Please Guide Me.
Bookmarks