I'm trying to draw various styles for a QwtPlotCurve, and the only color I get is black. I can make the symbols whatever color I choose, but the symbol color isn't changing the connecting lines.

Qt Code:
  1. ... // m_graphics is a QwtPlotCurve*
  2.  
  3. int curve_style = get_curve_style();
  4. int symbol_style = get_symbol_style();
  5. int pen_style = get_pen_style();
  6. QColor c = get_color();
  7.  
  8. m_graphics->setStyle(static_cast<QwtPlotCurve::CurveStyle>(curve_style));
  9. m_graphics->setPaintAttribute(QwtPlotCurve::PaintFiltered);
  10.  
  11. QwtSymbol symbol;
  12. QPen p;
  13. QBrush b;
  14. b.setStyle(Qt::SolidPattern);
  15. b.setColor(c);
  16.  
  17. p.setStyle(static_cast<Qt::PenStyle>(pen_style));
  18. p.setColor(c);
  19.  
  20. symbol.setBrush(b);
  21. symbol.setPen(p);
  22. symbol.setSize(QSize(5,5));
  23. symbol.setStyle(static_cast<QwtSymbol::Style>(symbol_style));
  24.  
  25. m_graphics->setSymbol(symbol);
To copy to clipboard, switch view to plain text mode 

m_graphics is later used by calling setRawData() and then draw(int, int). I'm using Qwt 5.2.1.

Why doesn't the color "c" get used for the lines connecting the symbols?

Thanks,
Tom