Quote Originally Posted by ChrisW67 View Post
Warning... code off top of head:
Qt Code:
  1. for (int i = 0; i < listWidget->count(); ++i) {
  2. listWidget->item(i)->setForeground(Qt::yellow);
  3.  
  4. qDebug() << listWidget->item(i)->text();
  5. }
To copy to clipboard, switch view to plain text mode 

I am not sure the second part of your question means. The QListWidget contains a list of pointers to QListWidgetItem objects. You can subclass QListWidgetItem to do something special and insert pointers to subclass objects. You can also store any data that can fit into a QVariant against a Qt::UserRole using QListWidgetItem::setData() and QListWidgetItem::::data().
Thank you very much.
By my second question i meant, Is there a way that i can store refrences to any other objects rather than just simple string texts?
and you forgot to answer my third question on C#s Tostring() method counter part in QT.