2017-03-25 8 views
0

私はQtcustomPlotを使用していますが、クラスQCPAxisTickerTimeでY軸をDatetime軸に変更しようとしたときに、このエラーが発生しました。私はQSharedPointerライブラリを含んだ。誰もがそれを知っていて、私を助けてください。QCPAxisTickerTimeエラー

私はQt5.8.0とQCustomPlotバージョン2.0.0ベータ版を使用しています。

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

ありがとうございました。

+0

また、いくつかのコードを共有する必要があります。 –

+0

QCustomPlot v1.3.2を使用しているときに同じ問題が発生しました.2.0.0ベータに切り替えると、正常に動作していることを確認してください:qcustomplot.cppを開き、 'QCPAxisTickerTime'を見つけてください – Fanckush

答えて

0
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); 

これは私に役立ちました。

関連する問題