Hello,
I'm using Qwt to plot more than one curve, but I would like to have different color for each curve. I don't know why, but even if I change the value of the color using an increment my curves get always the same color. I checked the color mapping and I saw the values for each color, then I tried to start with Qt::Black (value 2) and use a counter to increment to the next color. Example below:

Qt Code:
  1. graph[iGraphCounter].setAxes(QwtPlot::xBottom,QwtPlot::yLeft+iGraphCounter);
  2. graph[iGraphCounter].setTitle(object->legend.c_str());
  3. graph[iGraphCounter].setRenderHint(QwtPlotItem::RenderAntialiased);
  4. graph[iGraphCounter].setLegendAttribute(QwtPlotCurve::LegendShowLine, true);
  5. graph[iGraphCounter].setPen(QColor(Qt::black+iColorCounter));
  6. graph[iGraphCounter].setStyle(QwtPlotCurve::Lines);
To copy to clipboard, switch view to plain text mode 

But when I run the software all my curves are black. The increment for the graph handler is ok, the increment for the new y-axis is ok and the increment for the color is ok. I checked with a break point and my variable is incrementing fine and changing the value, but somehow the color doesn't change.

Can anyone help me? I have no idea about what it's wrong. It would be nice some help.

Thanks in advance
Best Regards