我有方法。此方法具有静态 QTime,但如果发生某些事情,我想重置此值。
static QTime time(QTime::currentTime());
// calculate two new data points:
double key = time.elapsed()/1000;
static double lastPointKey = 0;
if(newPlot == true){
// like tihs key = 0 ;
// lastPointKey = 0 ;
}