[Interest] Help, please !!!

Nikos Chantziaras realnc at gmail.com
Mon Apr 23 19:33:43 CEST 2012


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.
   }




More information about the Interest mailing list