QMultiMap And QDataStream

364 Views Asked by At

I saw in QtAssistant that QDataStream supports QMap and QMultiMap inherits QMap . Does Qt support QMultiMap for serialization with QDataStream ?

1

There are 1 best solutions below

0
On

I haven't tried it, but it should. QMultiMap doesn't fundamentally change anything about QMap. Even a regular QMap can handle multiple values with the same key. QMultiMap just provides a few extra convenience functions.

I'd also note that the documentation doesn't mention anything about any incompatabilities, even claiming that

Because QMultiMap inherits QMap, all of QMap's functionality also applies to QMultiMap.