Kay, so taht's not possible. Using QMap with a dummy .data field seems a little too messy to me, using QList<> as suggested by wysota is ofcourse possible.
Thanks all, guess i'll go with that.

Lil follow-up problem:
I can only get const References to the items contained in the list. Why?

Qt Code:
  1. MyClass& LeFunc(...)
  2. {
  3. QList<MyClass> list;
  4.  
  5. ...
  6.  
  7. Q_FOREACH(MyClass& i, list) //error C2440: 'initializing' : cannot convert from 'const MyClass' to 'MyClass &'
  8. {
  9. if(i.thisisit())
  10. return i;
  11. }
  12.  
  13. ...
  14.  
  15. }
To copy to clipboard, switch view to plain text mode