pgd-karolina.lindqvist at algonet.se
Sun Oct 1 19:48:37 BST 2000
Den Wed, 27 Sep 2000 skrev Phil Thompson:
> You have never been able to index QStringLists. My guess is that you are
> using QDir.entryList() to get your file names. In Qt v1.x this returned
> a QStrList which PyQt converts to a Python list under the covers which
> you can index. In Qt v2.x it returns a QStringList which PyQt leaves as
> a regular class. Unfortunately QStringList makes heavy use of operators
> for accessing individual elements - which aren't supported by SIP. This
> makes QStringList in PyQt almost useless.
You are so right. I did not notice that the return value of entryInfoList()
> In the meantime the workaround is to use QDir.entryInfoList() to get a
> list of QFileInfo instances (which you can index) and extract the
> filename from there.
This change worked beautifully -- thanks.
-- Karolina Lindqvist
More information about the PyQt