Important: Please read the Qt Code of Conduct - https://forum.qt.io/topic/113070/qt-code-of-conduct
Assigning a value to a QScopedPointer<QString>?
Calicoder last edited by
Hello, hope everyone is well. Got a pickle of an error here, any tips would be appreciated. Been googling for over an hour and no luck so far. Is it possible to assign a value to a variable wrapped in a QScopedPointer? Error I get is "no operator = matches these operands"
TestCode.cpp QScopedPointer<QString> customerString; QString newString01 = "Valued Customer"; existingString = newString01; // error line
Pl45m4 last edited by Pl45m4
I can't say what type
existingStringis, but you can't assign a
QStringvalue to a
As stated here,
QScopedPointerdoes not have any
= operatoror copy c'tor.
But the real question here is - why do you want to use
QScopedPointer<QString>in the first place?