I would like to make a QList of QwtPlotCurve s. The reason for this is to be able to remove them later form my QwtPlot. I have the following code:

Qt Code:
  1. QList<QwtPlotCurve> myList = new QList<QwtPlotCurve>;
  2. QwtPlotCurve* curve1 = new QwtPlotCurve();
  3. QwtPlotCurve* curve2 = new QwtPlotCurve();
  4. curves->append(curve1);
  5. curves->append(curve2);
To copy to clipboard, switch view to plain text mode 

The code doesn't compile and the compiler outputs:

error: conversion from 'QList' to non-scalar type 'QList' requested

error: no matching function for call to 'QList::append(QwtPlotCurve&)' void QList::append(const T&) [with T = QwtPlotCurve]

note: candidates are:

note: void QList::append(const T&) [with T = QwtPlotCurve]

note: no known conversion for argument 1 from 'QwtPlotCurve*' to 'const QwtPlotCurve&'

note: void QList::append(const QList&) [with T = QwtPlotCurve]

note: no known conversion for argument 1 from 'QwtPlotCurve*' to 'const QList&'

...

It says the QwtPlotCurve should be constant, but I don't know how to deal with it. I don't know neither whether storing curves in a QList and then removing it (on user demand) from the plot is the right approach.