QMap wont serialize in QDataStream without include QVariant
-
Hi guys, im new in qt, im've noted that the compiler emit an error when trying to serialize a QMap without QVariant header:
@QDataStream& operator <<(QDataStream& out, const UserData& ud){
out << ud.getUserName() << ud.getUserKey() << ud.getKeys();
return out;
}@/Users/aldebaran/QtProjects/chaveiro/userdata.cpp:4: error: invalid operands to binary [removed]'QDataStream' and 'QMap<qint8, QString>')
out << ud.getUserName() << ud.getUserKey() << ud.getKeys();
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ ^ ~~~~~~~~~~~~is this normal?