On Sun, 17 Mar 2013 12:39:32 +0100, Wilbert Berendsen <wbs...@xs4all.nl> wrote: > Hi all, > > When I store a list of strings (but happening to be empty) in > QSettings (using QString and QVariant api 2): > > e.g.: > >>>> paths = [] >>>> QSettings().setValue('paths', paths) > > Retrieving it yields a TypeError, instead of an empty list: > >>>> QSettings().value('paths', [], 'QString') > > Traceback (most recent call last): > File "<stdin>", line 1, in <module> > TypeError: unable to convert a QVariant of type 0 to a QMetaType of > type 10 > > What is the most elegant way to circumvent this? cathing the TypeError > and returning the empty list? > > Best regards, > Wilbert
I can't reproduce this. I need a short complete script that demonstrates the problem and the version numbers you are using. Phil _______________________________________________ PyQt mailing list PyQt@riverbankcomputing.com http://www.riverbankcomputing.com/mailman/listinfo/pyqt