A bar chart with so many values, that avoiding a copy is important ?
Anyway, QVector - like all Qt containers - is implicitly shared. So there is no real copy until you change one of the "copies" ( copy on write ). Beside that you can always use a QwtSeriesData bridge to your data, so that you are free to store your samples however you like. As Qwt doesn't see behind this bridge you can be sure, that they will never be copied - unless your code does it.
So it is more the other way round: QwtPlotCurve::setRawData() is legacy code and is only left over for convenience and compatibility. It doesn't offer much value since the very, very first versions of Qwt.
Uwe




Reply With Quote


Bookmarks