What's the equivalent std::deque in Qt? -
i on several lines codes qt project appending qvector every 1s. noticed in stl deque have better performance in adding new element end vector. what's equivalent or similar qt way? cause don't find in qt libraries.
julio
there no direct equivalent std::deque
class in qt.
however, best bet use qlist.
here documentation says qt container classes:
for purposes, qlist right class use. index-based api more convenient qlinkedlist's iterator-based api, , faster qvector because of way stores items in memory. expands less code in executable.
anyways, if appending items once every second, there not impact choose 1 on other.
Comments
Post a Comment