[Qt-interest] QDataStream backwards incompatibility introduced in 4.6
Murphy, Sean M.
sean.murphy at gd-ais.com
Thu Jan 21 15:17:44 CET 2010
> To read floats from files written with a QDataStream from an older Qt,
> you could either call stream.setVersion(11) or
> stream.setFloatingPointPrecision(QDataStream::SinglePrecision) before
> using the stream.
Technically you should call stream.setVersion(QDataStream::Qt_4_5)
instead of 11. It's easier to read, as well as it being forward
compatible. In theory Nokia could change the values (although I'm
pretty sure they wouldn't).
Sean
More information about the Qt-interest-old
mailing list