[PyKDE] PyQt4 QStringList (again)
phil at riverbankcomputing.co.uk
Thu Jan 26 14:26:20 GMT 2006
On Thursday 26 January 2006 2:01 pm, Doug Bell wrote:
> I didn't get any replies to my earlier message about QStringList in
> PyQt4, but maybe it wasn't clear. So I'll try again.
> In the example programs, QStringLists are created using stream
> s = QtCore.QStringList()
> s << 'String 1' << 'String 2'
> This method works, but it isn't very Pythonic. If you already have a
> Python list of strings, it requires an extra iteration through the list.
> My preference would be for this to work:
> s = QtCore.QStringList(['String 1', 'String 2']) # doesn't work
> Is this possible? The use of QStringLists to initialize widgets is more
> common in Qt4 than it was in Qt3, so it would be nice to have an easier
I haven't forgotten it - just hasn't reached the top of the pile yet.
More information about the PyQt