Or maybe, do you have some idea how to save data? My situation is:
I have no idea what you are trying to accomplish. Maybe if you described (in words) the user problem you are trying to solve with "pads", "keys" and so forth, it will make more sense.

If you have a custom class or struct that you wish to serialize using the QDataStream operators, your operator methods have to serialize -all- of the members of that class or struct if you want to be able read in and restore exactly what you have written. You don't just serialize one member unless you can somehow create the values of the other members from that one member's value.

I don't understand why you are defining a t_timeloops struct that contains another QMap as a member. If that's all it is, typedef it:

Qt Code:
  1. typedef QMap< QString, t_keyParam > t_timeloops;
To copy to clipboard, switch view to plain text mode 

You still end up with a QMap< QString, QMap< QString, t_keyParam > > as your top-level data container without the extra class as a nuisance, if that is indeed what you want.

You do not need to write any other QDataStream operators -except- the pair for t_keyParam, and you need to read / write -all- the members of that struct. The QMap operators will take care of the jigher levels for you.