Hey!
I'm messing around with the QwtPlotGrid and it's coming along just fine with the exception that I can't manage to make the grid the way I like it. The ticks are in their default position and the interval of the major and minor ticks are changed as the scale is "zoomed" in or out depending on the magnitude of the values plotted/displayed. I want them to be static and custom.

Let's take a simple example:
I use the 'histogram'-example from qwt examples.
Here is the code that generates the grid:
Qt Code:
  1. QwtValueList vlist[3]; // <-I added this!
  2. vlist[0] << -78 << -66 << -54 << -42 << -30 << -18 << -6 << 6 << 18 << 30;// <-I added this!
  3. vlist[1] << -84 << -60 << -36 << -12 << 12 << 36;// <-I added this!
  4. vlist[2] << -72 << -48 << -24 << 0 << 24;// <-I added this!
  5.  
  6. QwtScaleDiv scdiv(-78, 36, vlist);// <-I added this!
  7.  
  8. QwtPlotGrid *grid = new QwtPlotGrid;
  9. grid->setXDiv(scdiv);// <-I added this!
  10. grid->enableXMin(true);
  11. grid->enableYMin(true);
  12. grid->setMajPen(QPen(Qt::black, 0, Qt::DotLine));
  13. grid->setMinPen(QPen(Qt::gray, 0 , Qt::DotLine));
  14. grid->attach(&plot);
To copy to clipboard, switch view to plain text mode 

Why does this code display the same standard grid as when my additions are commented out?
The goal is to apply the strange scale(grid) from vlist in the X-axis.

It seems to me that my QwtScaleDiv is OK and from the documentation I get the impression that only the setXDiv command is necessary to apply it to the grid object...

Thank you!
/Tottish