Хочу подключить для теста к qchart opengl. пробывал делать:
OpenGLChartView *chartView;
QChart *chart;
QLineSeries *series;
QLineSeries *series1;
QLineSeries *series2;
QValueAxis *axisY;
QValueAxis *axisY2;
QValueAxis *axisY3;
QDateTimeAxis *axisX;
chart = new QChart();
series = new QLineSeries();
series1 = new QLineSeries();
series2 = new QLineSeries();
series->clear();
series1->clear();
series2->clear();
series->setUseOpenGL(true);
series1->setUseOpenGL(true);
series2->setUseOpenGL(true);
chartView = new QChartView(this);
chartView->setRenderHint(QPainter::Antialiasing);
ui->verticalLayout->addWidget(chartView);
font.setPointSizeF(10);
axisY = new QValueAxis;
axisY->setLabelFormat("%.1f");
axisY->setLabelsFont(font);
axisY->setLinePen(penY);
axisY->setRange(0, 100);
axisY2 = new QValueAxis;
axisY2->setLabelFormat("%.1f");
axisY2->setLabelsFont(font);
axisY2->setLinePen(penY2);
axisY2->setRange(0, 1);
axisY3 = new QValueAxis;
axisY3->setLabelFormat("%.1f");
axisY3->setLabelsFont(font);
axisY3->setLinePen(penY3);
axisY3->setRange(0, 1);
axisX = new QDateTimeAxis;
axisX->setFormat("HH:mm");
axisX->setLabelsFont(font);
axisX->setLabelsAngle(15);
*series<<QPointF(QwtDate::toDouble(dt),lineData[4].toFloat());
*series1 << QPointF(QwtDate::toDouble(dt), lineData[3].toFloat());
*series2 << QPointF(QwtDate::toDouble(dt), lineData[2].toFloat());
chart->addSeries(series);
chart->addSeries(series1);
chart->addSeries(series2);
chart->legend()->hide();
chart->addAxis(axisY, Qt::AlignRight);
series->attachAxis(axisY);
series->setPen(penY);
chart->addAxis(axisY2, Qt::AlignRight);
series1->attachAxis(axisY2);
series1->setPen(penY2);
chart->addAxis(axisY3, Qt::AlignRight);
series2->attachAxis(axisY3);
series2->setPen(penY3);
chart->addAxis(axisX, Qt::AlignBottom);
series->attachAxis(axisX);
series1->attachAxis(axisX);
series2->attachAxis(axisX);
chartView->setChart(chart);