why do you want to implement it? It's already implemented...

http://qt-project.org/doc/qt-4.8/qsc...eiterator.html