I'm using a QwtPlot based on one of the samples, with multiple curves.

When my QwtCurve is configured with a aliceblue color pen, I don't see the curve (this does not reproduce with other colors).

Would be hard to put in all the code that draws the points but here is the color related part:

Relevant header:
Qt Code:
  1. //! Collection of all curves in plot
  2. QMap<QString, QwtPlotCurve*> mCurves;
To copy to clipboard, switch view to plain text mode 

Code in constructor:
Qt Code:
  1. setAutoReplot(false);
  2.  
  3. //! No caching
  4. canvas()->setPaintAttribute(QwtPlotCanvas::PaintCached, false);
  5.  
  6. #if defined(Q_WS_X11)
  7. // Even if not recommended by TrollTech, Qt::WA_PaintOutsidePaintEvent
  8. // works on X11. This has a nice effect on the performance.
  9.  
  10. canvas()->setAttribute(Qt::WA_PaintOutsidePaintEvent, true);
  11. canvas()->setAttribute(Qt::WA_PaintOnScreen, true);
  12. #endif
  13.  
  14. plotLayout()->setAlignCanvasToScales(true);
  15. QwtPlotGrid *grid = new QwtPlotGrid();
  16. grid->setPen(QPen(Qt::gray, 0.0, Qt::DotLine));
  17. grid->enableX(true);
  18. grid->enableXMin(true);
  19. grid->enableY(true);
  20. grid->enableYMin(false);
  21. grid->attach(this);
  22.  
  23. for (int i = 0; i < objectsToPlot.count(); i++)
  24. {
  25. QwtPlotCurve *currCurve = new QwtPlotCurve(objectsToPlot.at(i).combinedIndex);
  26. currCurve->setStyle(QwtPlotCurve::Lines);
  27. currCurve->setPen(QPen(objectsToPlot.at(i).color)); // Here: color is aliceBlue
  28. currCurve->setRenderHint(QwtPlotItem::RenderAntialiased, true);
  29. currCurve->setPaintAttribute(QwtPlotCurve::ClipPolygons, false);
  30. currCurve->setZ(i);
  31. currCurve->setData(new QwtPointSeriesData());
  32. currCurve->attach(this);
  33.  
  34. mCurves.insert(objectsToPlot.at(i).combinedIndex, currCurve);
  35. }
To copy to clipboard, switch view to plain text mode