I have had time to further look at my problem and find the solution.
In reality I didn´t see that the line of the curve within the legend was plotted, because the line has a light yellow colour and the background is light gray. The line is also very short.
I added a curve title which is now displayed as assumed and so fix the view onto the legend.
I have attached the revised code below.

Uwe, I am aware that in a normal case it is necessary to allocate the memory on the heap, this was a fast evaluation how to mix SigLib and Qwt, and I only had a main function, so allocating on the stack was OK for that peculiar purpose.
Anyway, now I am going to clone the SigLib graphics function written with SignalVisualize/wxWidgets with Qt/Qwt, and there of course I´ll use the approach recommended by you.
Qt Code:
  1. // plot object
  2. QwtPlot myPlot;
  3. myPlot.setTitle( "Autospektrum!" );
  4. myPlot.setAxisTitle( QwtPlot::xBottom, "frequency bin" );
  5. myPlot.setAxisTitle( QwtPlot::yLeft, "log Amplitude" );
  6. myPlot.setCanvasBackground( QColor( Qt::darkBlue ));
  7.  
  8. // grid
  9. grid.enableXMin( true );
  10. grid.setMajPen( QPen( Qt::white, 0, Qt::DotLine ));
  11. grid.setMinPen( QPen( Qt::gray, 0 , Qt::DotLine ));
  12. grid.attach( &myPlot );
  13.  
  14. // define the curve object
  15. QwtPlotCurve curve;
  16. curve.setSamples( pXData, pResults, FFT_LENGTH );
  17. curve.setPen( QPen( Qt::yellow ));
  18. curve.setRenderHint( QwtPlotItem::RenderAntialiased );
  19. curve.setTitle("Sinus");
  20. curve.setLegendAttribute( QwtPlotCurve::LegendShowLine );
  21. curve.attach( &myPlot );
  22.  
  23. // legend
  24. QwtLegend legend;
  25. myPlot.insertLegend( &legend, QwtPlot::RightLegend );
  26.  
  27. //myPlot.replot();
  28. myPlot.show();
To copy to clipboard, switch view to plain text mode