@QTNewbie2020 QMap isn't, by itself, a complete type. A function can't return a QMap in-general. QMap<QString, int> is what you declare inside the function, so you have to declare the function as return that specific type of QMap to have a complete type. A QMap<float, int> for example would be a completely different type as far a sthe compiler is concerned. They just look like similar names to a human.