[PyQt] QVariant doesn't save python list

Keith keithbegreat at gmail.com
Sat Nov 8 14:01:55 GMT 2008


Hi

I've written a piece of code that seems to work fine in PyQt 4.0.1 which is
in Debian Etch. Basically it just takes a list of string and saves it using
QSettings object. The code is similar to:

settings = QSettings()

strings = [u'string0', u'string1', u'string2', u'string3', u'string4',
u'string5', u'string6', u'string7', u'string8', u'string9']

settings.saveValue("Header", QVariant(strings))

This works fine, but on PyQt 4.4.3 it gives an error:

    QVariant::save: unable to save type 429.

I've tried using QStringList instead, but no luck.

What is causing this and is there anything I can do about it?
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://www.riverbankcomputing.com/pipermail/pyqt/attachments/20081108/1874bf23/attachment.html


More information about the PyQt mailing list