Is there a way to redraw the labels on an axis' ticks to update the labels along it like how you can replot a QwtPlot to update the curves being drawn within?

I have a subclassed QwtScaleDraw that returns a time associated with a value v ranged from [0-PLOTUPPERBOUND] along the x-axis when it is passed label(v) and it is working but the x-axis labels are only updated after the initial setAxisScale and I haven't found out how to continue updating them after this point. I have data coming in to the plot in real time, and I'd like to have the x-axis labels also update in real time to show the time the data came in (underneath the time string the x values are static numbers of the range [0-PLOTUPPERBOUND] ). Right now if I create a new plot after the data collection has begun then I'll see the x-axis labels be updated to the current moment, but I want them to continue to update in realtime with the collected data after this point.

I've tried using the method in the cpuplot example where the axis is continuously shifted along with the data but the problem with using that method here is that it ends up breaking the qwtPlotZoomer I'm using within the plot unless I pause the plot's updating because every call to setAxisScale while updating will undo any zoom along the x-axis (the y-axis zoom remains) when new data comes in and the axes are shifted.

My subclassed QwtScaleDraw is below though it's almost exactly the same as the one from the cpuPlot example:

Qt Code:
  1. class TimeScaleDraw: public QwtScaleDraw
  2. {
  3. public:
  4. TimeScaleDraw( QTime *base )
  5. : baseTime( base )
  6. {
  7. }
  8. virtual QwtText label( double v ) const
  9. {
  10. // QTime upTime = baseTime->addMSecs( static_cast<int>( v * 50 ) );
  11. // return upTime.toString("hh:mm:ss.zzz");
  12. return baseTime[PLOTUPPERBOUND - ((int)v % PLOTUPPERBOUND)].toString("hh:mm:ss.zzz");
  13. }
  14. private:
  15. QTime *baseTime;
  16. };
To copy to clipboard, switch view to plain text mode