Starting from version 5.2, Qt has got two classes that allow iterating over container elements with a variable data type. QSequentialIterable for QList (and similar) and QAssociativeIterable for QHash and QMap .

From the description provided in the help to them I just can’t understand why they are needed at all if the same QVariantList or QVariantMap get through the usual foreach or their own iterators. Similarly, in the loop, we get QVariant , which again must be converted to the original type contained in the container. What then is their difference and what is the benefit of using new Iterable ?

    1 answer 1

    Here is a link to the document, whose author is Stephen Kelly, the developer of Grantlee. This guy should understand in Qt))) Considering that the subject of this issue is sort of like his brainchild.

    • Could you translate, maybe short, so that the answer and argumentation in it would be digestible to the overwhelming majority of users of the site who prefer information in Russian? Thank. - alexis031182