I have a problem using the member function attach several times. Compiler does not find error, however only one curve appear that does not satisfy me. Is it possible to attach several curves to QwtPlot object?

In other words, I have attached many curves, than I make replot. As a result, only last attached curve is visible. I have studied sinusplot demo. The only difference with my code i have found is that all curves have been attached inside constructor. I do it in public member function.

This seems relevant.

In Google most information is about old 5. version of qwt. I have qwt 6. There is surprisingly little information about it. I did not find tutorial or something like this. However, changes are significantly as following from demo files.

Here is my member function which draws several characteristics stored in ps_x and ps_y sequentially in the single column. The number of characteristics equals number_of_characteristics.

void DataPlot::plot_Draw(double ps_x[], double ps_y[], double x_min, double x_max, double y_min, double y_max, int number_of_characteristics)
	double psx[1500];
	double psy[1500];
	setAxisScale(QwtPlot::xBottom, x_min, x_max);
	setAxisScale(QwtPlot::yLeft, y_min, y_max);  
	QwtPlotCurve *d_curves[number_of_characteristics];
	for (int j=0;j<number_of_characteristics;j++){
		d_curves[j] = new QwtPlotCurve("Gain spectra");

		for (int j1=0;j1<1500;j1++){
		// Insert new curves		

I have found solution. Everything works nice if I use setSamples instead of setRawSamples.