thats what I thought.
the logic is that usually I have a function that looks something like this.
Qt Code:
  1. void Present::present() const
  2. {
  3. cout<<"To: "<<this->to<<" Is: "<<this->is;
  4. }
To copy to clipboard, switch view to plain text mode 
and In my other class with the array I have this function
Qt Code:
  1. void Hadler::show()const
  2. {
  3. for(int i=0;i<this->nrOfPresents;i++)
  4. {
  5. this->prsnt[i]->present();
  6. }
  7. }
To copy to clipboard, switch view to plain text mode 
so lets say I call show() in main it will go through my array and cout all the info in it.

What I want to do is something similar.
Now I have a function that gets the content from the array, converts everything to one big string and then returns that and then it presents it in my listwidget, after that I does the same thing again until all items are presented in the listwidget.

thats why I have the following function cos I want the QString to be return as long as i is less then nrOfDiets.
Qt Code:
  1. QString DH::toQString()const
  2. {
  3.  
  4. for(int i=0;i< this->nrOfDiets;i++)
  5. {
  6. return this->dh[i]->toQString();
  7. }
  8. }
To copy to clipboard, switch view to plain text mode 

Hope you understand