How to get the x an y corrdinates from mouse postion
Hi,
I am trying the realtime_plot example how can I set the
mouseTracking to true so that I can get he mouse postion which can be passed to the Qwtplotpicker to get the trackText and can be outputed to a status bar
But even If I have set the mouse tracking(setMouseTracking(true)) to true in the IncrementalPlot I am not able to get the mouse move event in the virtual event()(Qwtplot) which I have rewritten in incremental plot.
I only able to get this event only when I click the left mouse button and move it.
Please let me know how to get the mouse event even when it is not clicked.
Re: How to get the x an y corrdinates from mouse postion
Mouse tracking has to be enabled for the viewport, I assume QwtPlot has one...
Re: How to get the x an y corrdinates from mouse postion
With picker->setDisplayMode(QwtPicker::AlwaysOn) the positions is always displayed.
If you want to see that the QwtPlotPicker::moved() signal is emitted - even when the mouse is not pressed - there are many different ways to do it. Probably the most easiest one is to overload QwtPlotPicker::widgetMouseMoveEvent this way:
Code:
{
emit moved(invTransform(me->pos));
}
HTH,
Uwe