Hi, I need to save images in an array, but I tried some things, but still not working, need help.
I'm trying to use and set values to a QGraphicsPixmapItem Array (using C++ arrays) and using QList too.

My code here:
Qt Code:
  1. QGraphicsPixmapItem pixmapArray[n*m];
  2. for(int i=0;i<n;i++){
  3. for(int j=0;j<m;j++){
  4. QPixmap *icon = new QPixmap(list.at(biDiArray[i][j])); //list of a QString
  5. image.setPixmap(*icon);
  6. pixmapArray[i*10+j] = image;
  7. }
  8. }
To copy to clipboard, switch view to plain text mode 

I tried to use it as QList too, but didn't work.

Qt Code:
  1. for(int i=0;i<this->n;i++){
  2. for(int j=0;j<this->m;j++){
  3. QPixmap *icon = new QPixmap(list.at(mat[i][j]));
  4. this->pixmapItemList.insert(10*i+j,*image);
  5. }
  6. }
To copy to clipboard, switch view to plain text mode