Hi, I use QCustomPlot 2, Qt5.9.1, Qt Creator 4.6.1.

QSharedDataPointer<QCPAxisTickerDateTime> dateTimeTicker(new QCPAxisTickerDateTime);
    dateTimeTicker->setDateTimeFormat("dd:hh:ss");
    customPlot->xAxis->setTicker(dateTimeTicker);
    customPlot->xAxis->setTickLabelFont(QFont(QFont().family(), 8));
    customPlot->yAxis->setTickLabelFont(QFont(QFont().family(), 8));
    customPlot->xAxis2->setVisible(true);
    customPlot->yAxis2->setVisible(true);
    customPlot->yAxis->setTickLabelColor(QColor(Qt::red));
    customPlot->legend->setVisible((true));
    graphic = new QCPGraph(customPlot->xAxis, customPlot->yAxis);

When I try to compile a program, I get an error:
C:\Qt\5.9.1\mingw53_32\include\QtCore\qshareddata.h:227: error: 'class QCPAxisTickerDateTime' has no member named 'ref'
{ if (d) d->ref.ref(); }
^
C:\Qt\5.9.1\mingw53_32\include\QtCore\qshareddata.h:89: error: 'class QCPAxisTickerDateTime' has no member named 'ref'
inline ~QSharedDataPointer() { if (d && !d->ref.deref()) delete d; }
^