There may be a more desirable way to accomplish this, but here's *one* way... First, a couple of typedefs to improve readability IMHO:
typedef QVector<double> DoubleVector;
typedef QSharedPointer<DoubleVector> SharedDoubleVectorPtr;
typedef QVector<double> DoubleVector;
typedef QSharedPointer<DoubleVector> SharedDoubleVectorPtr;
To copy to clipboard, switch view to plain text mode
Then the following code:
DoubleVector dv = getmData();
SharedDoubleVectorPtr sp(&dv);
DoubleVector dv = getmData();
SharedDoubleVectorPtr sp(&dv);
To copy to clipboard, switch view to plain text mode
Hope that helps.
Bookmarks