HTH,Qt Code:
TimeScaleDraw* scaleDraw = dynamic_cast<TimeScaleDraw*>( plot->axisScaleDraw( ... ) ); scaleDraw->start(); scaleDraw->invalidateCache(); plot->replot();To copy to clipboard, switch view to plain text mode
Uwe
HTH,Qt Code:
TimeScaleDraw* scaleDraw = dynamic_cast<TimeScaleDraw*>( plot->axisScaleDraw( ... ) ); scaleDraw->start(); scaleDraw->invalidateCache(); plot->replot();To copy to clipboard, switch view to plain text mode
Uwe
grantbj74 (19th March 2012)
The scaleDraw->invalidateCache() gives a protected error when compiling.
If I put invalidateCache() inside a new function that changes appearance in TimeScaleDraw class: eg ms, sec, clock etc it changes straight away.
However if invalidateCache() is put in the end of start() time still doesn't update until the plot starts moving etc. I guess this isn't too much of an issue.
I just use the following for time atm:
Qt Code:
{ return m_base_time.toString("H:mm:ss.zzz"); }To copy to clipboard, switch view to plain text mode
The call to invalidateCache() won't cause a replot on its own, it is just a method to ensure that the labels are recalculated the next time there -is- a replot. So after you construct your TimeScaleDraw class, call replot() from where ever you are in the code.
Yeah I was calling replot() last but made no difference.
Bookmarks