What class of Qt can replace the class CPtrList of MFC?
-
The question is as the title: What class of Qt can replace the class CPtrList of MFC?
-
The question is as the title: What class of Qt can replace the class CPtrList of MFC?
-
Yes it seems to be a list of pointers, https://msdn.microsoft.com/en-us/library/0sbwsc4e.aspx. Beecksche gave a proper link. But in many cases you can also use the standard C++ STL containers if you want (http://en.cppreference.com/w/cpp/container, http://www.cplusplus.com/reference/stl/).
-
Yes it seems to be a list of pointers, https://msdn.microsoft.com/en-us/library/0sbwsc4e.aspx. Beecksche gave a proper link. But in many cases you can also use the standard C++ STL containers if you want (http://en.cppreference.com/w/cpp/container, http://www.cplusplus.com/reference/stl/).
-
@Eeli-K
When using the Qt Framework i would prefer the Qt containers:These container classes are designed to be lighter, safer, and easier to use than the STL containers
@beecksche
a QList<Type *> would work the same it seems.
The access functions are very similar but of course named differently.