I have a back up copy of data that I would like to protect so I made it const. I need to violate that constness on two occassions, once to store vi
const
There is a little trick I learned looking at Qt's internals:
MyClass:circunventConst() const { MyClass* that = const_cast(this); that->myProtectedVariable = value; }