diff options
Diffstat (limited to 'src/charts/ChartView.cpp')
-rw-r--r-- | src/charts/ChartView.cpp | 12 |
1 files changed, 12 insertions, 0 deletions
diff --git a/src/charts/ChartView.cpp b/src/charts/ChartView.cpp new file mode 100644 index 0000000..24a08c5 --- /dev/null +++ b/src/charts/ChartView.cpp @@ -0,0 +1,12 @@ +#include "ChartView.h" + +ChartView::ChartView(QGraphicsScene* scene): + QGraphicsView(scene) +{ + setRenderHints(QPainter::Antialiasing); +} + +void ChartView::resizeEvent(QResizeEvent*) +{ + fitInView(scene()->sceneRect(), Qt::KeepAspectRatio); +} |