That's wholly unnecessary. Either:
Pass the image around as a value, it's cheap.
Use
QSharedPointer<QImage>
and pass that around. It's entirely unnecessary.
Internally a QImage
is what amounts to a shared pointer to image data. That's why passing it by value is cheap, and that's why using a shared pointer to it is pointless.