Il 02/11/18 20:13, Иван Комиссаров ha scritto:
Nice idea to have such a method. But is't it a pessimization to return a vector which certainly allocates? Don't throw rocks in me, what about passing std::function that can enumerate roles?
As I said, we can bikeshed on the signature. How do you return N role/variant pairs? Taking an output iterator as parameter isn't Qt style, so we need a container.
Note that in a item delegate (on widgets) the container can be allocated just once, and then simply re-filled with data (without reallocations) when painting each index.
Mind to elaborate on the std::function idea? Cheers, -- Giuseppe D'Angelo | [email protected] | Senior Software Engineer KDAB (France) S.A.S., a KDAB Group company Tel. France +33 (0)4 90 84 08 53, http://www.kdab.com KDAB - The Qt, C++ and OpenGL Experts
smime.p7s
Description: Firma crittografica S/MIME
_______________________________________________ Development mailing list [email protected] http://lists.qt-project.org/mailman/listinfo/development
