Hello,

How can I remove struct from Qlist ?

example (not working)
Qt Code:
  1. struct nick { QString name; QString subname; };
  2. QList<nick> nicklist;
  3.  
  4. foreach (nick n, nicklist)
  5. {
  6. if (n.name == "testname")
  7. {
  8. nicklist.removeOne(n);
  9. break;
  10. }
  11. }
To copy to clipboard, switch view to plain text mode