Chart display in tabWidget
Unsolved
General and Desktop
-
How to display a chart in tabwidget?
QLineSeries *series = new QLineSeries(); for(int i=0;i<size; ++i) series->append(p_overpressure[i], alpha[i]); QChart *chart = new QChart(); chart->legend()->hide(); chart->addSeries(series); chart->createDefaultAxes(); chart->setTitle("График изменения объемной доли газа в зависимости от давления в точке измерения"); QChartView *chartView = new QChartView(chart); chartView->setRenderHint(QPainter::Antialiasing);
In Example so
QMainWindow window; window.setCentralWidget(chartView); // display in the window window.resize(400, 300); window.show();