[Interest] QDatastream, QMap, QImage serialization

Jason H jhihn at gmx.com
Thu May 17 02:17:11 CEST 2018


> Sent: Wednesday, May 16, 2018 at 11:52 PM
> From: "Thiago Macieira" <thiago.macieira at intel.com>
> To: interest at qt-project.org
> Subject: Re: [Interest] QDatastream, QMap, QImage serialization
>
> On Wednesday, 16 May 2018 14:38:08 PDT Jérôme Godbout wrote:
> > You will need to provide your own
> > 
> > QDataStream& operator<<(QDataStream& ds, const QImage& img)
> 
> That's not needed (and won't compile). It already exists.
> 
> The problem is that QVariant doesn't know how to call it. So when you have a 
> QImage inside a QVariant and you try to serialise that QVariant, you get 
> nothing useful.

So could I provide a QImage derived class? What overrides would I need? Just the Qvariant ones?



More information about the Interest mailing list