swig: How to make a QList<T> iterable, like std::vector
问题 I'm using SWIG to generate Python Bindings for my qt app. I have several places where I use QLists and I would like to integrate those QLists like std::vector from the SWIG Library (see http://www.swig.org/Doc1.3/Library.html#Library_nn15). This means: The QList objects should be iterable from python (= they must be an iterable python object) It should be possible to pass a python list to a function which takes a qlist ... and all the other features listed in the SWIG Library for std::vector