Hi, in iOS there is NSMutableArray which is a dynamic array of any type of objects.
I think the best equivalent in Qt would be QVariantList right?? Thanks.
Hi, in iOS there is NSMutableArray which is a dynamic array of any type of objects.
I think the best equivalent in Qt would be QVariantList right?? Thanks.
Or QVector<QVariant> if the list is fixed or relatively static in length.
In Qt and in C++ there's no NSObject. So there is no direct alternative.
What you should use is then depends on what you want to do.
If you want to store value-types and pass them to scripts, you should use QVariantList.
If you want to to store widgets, you should use one of the Qt template container and store pointers, for example QList<QWidget*>.
More general case for non-gui elements is container with QObject*.
Bookmarks