diff --git a/plot.cpp b/plot.cpp --- a/plot.cpp +++ b/plot.cpp @@ -28,6 +28,8 @@ Plot::Plot(QWidget* parent) : QObject::connect(&zoomer, &Zoomer::unzoomed, this, &Plot::unzoomed); zoomer.setZoomBase(); + grid.setPen(Qt::lightGray); + grid.attach(this); } void Plot::setAxis(bool autoScaled, double yAxisMin, double yAxisMax) diff --git a/plot.h b/plot.h --- a/plot.h +++ b/plot.h @@ -18,6 +18,7 @@ */ #include +#include #include "zoomer.h" class Plot : public QwtPlot @@ -32,6 +33,7 @@ private: bool isAutoScaled; double yMin, yMax; Zoomer zoomer; + QwtPlotGrid grid; void resetAxes();