QCPAxisTickerTime Error



我正在使用QtcustomPplot,但是当我尝试通过类QCPAxisTickerTime将Y轴更改为日期时间轴时,我得到了此错误。我包括了QSharedPointer library。每个人都知道吗,请帮助我。

我使用的是Qt5.8.0和QCustomPplot版本2.0.0测试版。

error: ‘QCPAxisTickerTime’ was not declared in this scope    
QSharedPointer<QCPAxisTickerTime> timeTicker(new QCPAxisTickerTime);

非常感谢。

QSharedPointer<QCPAxisTickerTime> timeTicker(new QCPAxisTickerTime);
timeTicker->setTimeFormat("%h:%m:%s");
trend->CustomPlot->xAxis->setTicker(timeTicker);
QSharedPointer<QCPAxisTickerTime> timeTicker2(new QCPAxisTickerTime);
timeTicker2->setTimeFormat("%h:%m:%s");
trend->CustomPlot->yAxis->setTicker(timeTicker2);

这对我有用。

最新更新