| 1 |
// Copyright (C) 2016 The Qt Company Ltd. |
| 2 |
// SPDX-License-Identifier: LicenseRef-Qt-Commercial OR GPL-3.0-only |
| 3 |
|
| 4 |
#include "chartview.h" |
| 5 |
#include <QtWidgets/QApplication> |
| 6 |
#include <QtWidgets/QMainWindow> |
| 7 |
|
| 8 |
int main(int argc, char *argv[]) |
| 9 |
{ |
| 10 |
QApplication a(argc, argv); |
| 11 |
QMainWindow window; |
| 12 |
QChart *chart = new QChart(); |
| 13 |
ChartView chartView(chart, &window); |
| 14 |
chartView.setRenderHint(QPainter::Antialiasing); |
| 15 |
chart->setAnimationOptions(QChart::SeriesAnimations); |
| 16 |
window.setCentralWidget(&chartView); |
| 17 |
window.resize(400, 300); |
| 18 |
window.show(); |
| 19 |
return a.exec(); |
| 20 |
} |