1 Attachment(s)
Showing date-time value in QwtPlotPicker
Hello!
I want to use QwtPlotPicker so the user will be able to see the correspondent Y and X axis values each time he puts the mouse over the graph - such as in the bode example. The problem is that I'm using a date-time x coordinate, and then when I use the QwtPlotPicker it shows the correspondent double value of the date-time, not the date-time itself.
Attachment 8829
How can I make the QwtPlotPicker show the date-time value correspondent to the X axis?
A secondary question also related to QwtPlotPicker is: how can I limit the decimals that is shown by it? In this app particularly, I want no decimals for the Y axis value.
Thanks,
Momergil
Re: Showing date-time value in QwtPlotPicker
The same answer for both questions: see the stockchart example.
Uwe
1 Attachment(s)
Re: Showing date-time value in QwtPlotPicker
Quote:
Originally Posted by
Uwe
The same answer for both questions: see the stockchart example.
Uwe
Sorry Uwe, but are your sure about this? I went to the stockchart example and not only I found that it event doesn't implement QwtPlotPicker, but also the closest thing it has to it, which is a particular implementation of QwtPlotZoomer, also has the same problem I want to correct:
Attachment 8831
If you're sure that the answer is there, could you please be a little bit more specific where? Cause I can't see it. :T
Momergil
Re: Showing date-time value in QwtPlotPicker
QwtPlotZoomer is derived from QwtPlotPicker so you have to the same for both.
And I forgot - the code has been changed late. If it is not in rc3 you have to check SVN trunk.
Uwe
Re: Showing date-time value in QwtPlotPicker
Quote:
Originally Posted by
Uwe
QwtPlotZoomer is derived from QwtPlotPicker so you have to the same for both.
And I forgot - the code has been changed late. If it is not in rc3 you have to check SVN trunk.
Uwe
Well, I thought it would be better to simply install rc3 ;) What I found interesting, thought, is that after recompiling my working code, the software crashed each time it passed by QwtPlot->replot(). Since my code don't actually need it, no problem; I just found myself in a bad position regarding updating Qwt to rc3 for a project at home, where replot() is used all the time.
Thanks!
Momergil