Qcustomplot设置使用时间刻度坐标轴

代码如下:
以X轴为例(部分函数只能在1.0系列Qcustomplot中使用)
Qcustomplot版本问题:https://blog.csdn.net/qq_40194498/article/details/79696904

      //设置X轴时间刻度
       ui->customplot->xAxis->setTickLabelType(QCPAxis::ltDateTime);
       ui->customplot->xAxis->setDateTimeFormat("hh:mm:ss");
       ui->customplot->xAxis->setDateTimeSpec(Qt::LocalTime);

效果如图:
Qcustomplot设置使用时间刻度坐标轴_第1张图片

你可能感兴趣的:(QT,Qcustomplot)