Hi,
I have a marker and a picker combination in order to select a point in a histogram , but I need that the marker move when I select it and move when I click the left button mouse.
Some ideas?
Thanks.
Hi,
I have a marker and a picker combination in order to select a point in a histogram , but I need that the marker move when I select it and move when I click the left button mouse.
Some ideas?
Thanks.
Subclass a QwtPlotMarker, QObject so you can get the events. Then, write the eventFilter method so you can trap the events you want to capture.
Look at the ShapedClock example from Qt.
class DraggableMarker: public QObject, public QwtPlotMarker
{
Q_OBJECT
public:
DraggableMarker (QwtPlot *plot);
virtual bool eventFilter (QObject *, QEvent *);
};
A combination of a marker and the plot picker should be what you are looking for. The picker is for the dragging - the marker when you have placed it.
Uwe
I had to do something like that too, but i used a svg image to replace the marker.
http://www.qtcentre.org/forum/f-qwt-...ect-23234.html
Bookmarks