I also like foreach because its easy to use, avoids unnecessary copying and very readable and the performance is ok:

Qt Code:
  1. foreach(const QUrl& url, event->mimeData()->urls()) {
  2. //work
  3. }
To copy to clipboard, switch view to plain text mode