Drop the foreach and use a for with an index (or an iterator)
Qt Code:
for(int i = 0; i < nickList.count(); ++i) { if(nicklist.at(i).name == "fons") { nickList.removeAt(i); break; } }To copy to clipboard, switch view to plain text mode
Drop the foreach and use a for with an index (or an iterator)
Qt Code:
for(int i = 0; i < nickList.count(); ++i) { if(nicklist.at(i).name == "fons") { nickList.removeAt(i); break; } }To copy to clipboard, switch view to plain text mode
Bookmarks