Hello all,

I faced with a problem that using QwtPlotCurve::LegendShowSymbol doesn't show a symbol (a circle in my case) in a legend entirely:
legend1.png

Here is an example code:
Qt Code:
  1. class TestPlot: public QwtPlot
  2. {
  3.  
  4. public:
  5.  
  6. TestPlot(QWidget * parent = NULL);
  7.  
  8. private:
  9.  
  10. QwtPlotCurve _curve;
  11.  
  12. };
  13.  
  14. TestPlot::TestPlot(QWidget * parent) : QwtPlot(parent)
  15. {
  16.  
  17. QwtSymbol *sym = new QwtSymbol(QwtSymbol::Ellipse);
  18. sym->setSize(5);
  19. sym->setPen(QColor(Qt::blue));
  20.  
  21. _curve.setSymbol(sym);
  22. _curve.setStyle(QwtPlotCurve::NoCurve);
  23. _curve.setTitle(tr ("Curve"));
  24. _curve.setLegendAttribute(QwtPlotCurve::LegendShowSymbol);
  25. _curve.attach(this);
  26.  
  27. QVector <double> x;
  28.  
  29. for (unsigned i = 0; i < 10; ++i)
  30. {
  31. x.push_back(i);
  32. }
  33.  
  34. _curve.setSamples(x, x);
  35.  
  36. QwtLegend *legend = new QwtLegend(this);
  37. insertLegend(legend, QwtPlot::BottomLegend);
  38. }
To copy to clipboard, switch view to plain text mode 

If I change a symbol size from 5 to 10 everything looks nice:
legend2.png

Does anybody know why this can happen?
Thanks for any help!