Not sure whether this has anything to do with the problems you're experiencing, but you should call the qDebug() output after the it.next() call. (See Qt documentation about their java-style iterators.)