after spending hours(!) and thanks to you guys I got what to do,taking a peek to my previous post when I noticed the size inconsistency I tried to encode the str2Store using str2Store.toHex();
and then saved it into database and used the static method QByteArray::fromHex(str2recover);
and decoded it and saved it in a QImage and it just works like a charm now
I'm attaching the final code
Bookmarks