annili
31st August 2015, 16:36
I need to draw grid om QPixmap. I did that:
QwtPlotGrid grid;
grid.enableX(true);
grid.enableY(true);
grid.setMajorPen(QPen(Qt::black, 0, Qt::DashLine));
grid.setMinorPen(QPen(Qt::blue, 0 , Qt::DotLine));
and then draw :
grid.draw(&p, *_xMap, *_yMap, r1);
But nothing was happened. Thought the grid, that was attached to some QwtPlot did work and drew a grid.
Is there a way to draw QwtPlotGrid without attaching it to QwtPlot?
Thanks.
QwtPlotGrid grid;
grid.enableX(true);
grid.enableY(true);
grid.setMajorPen(QPen(Qt::black, 0, Qt::DashLine));
grid.setMinorPen(QPen(Qt::blue, 0 , Qt::DotLine));
and then draw :
grid.draw(&p, *_xMap, *_yMap, r1);
But nothing was happened. Thought the grid, that was attached to some QwtPlot did work and drew a grid.
Is there a way to draw QwtPlotGrid without attaching it to QwtPlot?
Thanks.