On 23/04/12 20:17, Miguel Milán Isaac wrote: > I need to use QList<QList<int> *> * list; > but I do not know how to initialize it. > > I want to do something like this: > if (! listRemoved-> at (pos) -> contains (id)) > { > //do something > }
QList< QList<int>* >* list = new QList< QList<int>* >; // Fill it with 10 elements. for (int i = 0; i < 10; ++i) { list->append(new QList<int>); // Or: // list->append(&someOtherList); } Now every list[i] (or list->at(i)) gives you a QList<int>*. For example: if (!list->at(pos)->contains(id)) { // Do something. } _______________________________________________ Interest mailing list Interest@qt-project.org http://lists.qt-project.org/mailman/listinfo/interest