[Interest] Inquiry Regarding the Implementation Method of QT COW Containers

xiaochaoyang0214 xiaochaoyang0214 at 163.com
Tue Nov 11 12:54:23 CET 2025


Hello,

I'm sorry for the disruption, yet I've encountered a query while delving into the Qt container source code. Specifically, I'm curious as to why Qt 6 employs std::map for QMap, but opts not to use std::vector for QList and QVector.

Given that the Qt team has chosen std::map as the foundational implementation for QMap, I wonder why an analogous approach wasn't taken for QList and QVector. Why not simply rework them as straightforward wrapper layers atop std::vector, in a manner similar to how std::map serves as the basis for QMap?

Your insights to clarify my doubts would be greatly appreciated.

Best regards, xcy
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.qt-project.org/pipermail/interest/attachments/20251111/3481208d/attachment.htm>


More information about the Interest mailing list