[prev in list] [next in list] [prev in thread] [next in thread] 

List:       pykde
Subject:    Re: [PyQt] TypeError: unable to convert a QVariant of type 9 to a QMetaType of type 1024
From:       Phil Thompson <phil () riverbankcomputing ! com>
Date:       2017-03-27 12:14:28
Message-ID: EC2370BD-DB49-42BB-852A-7EFC7F0DEC36 () riverbankcomputing ! com
[Download RAW message or body]

On 25 Mar 2017, at 7:05 am, Zhao Lee <redstone-cold@163.com> wrote:
> 
> 
> 
> >>> from PyQt5.QtCore import QSettings
> >>> settings = QSettings(QSettings.IniFormat, QSettings.UserScope, "iMath", "LYYDownloader2")
> >>> settings.value('list_value3',[],type=list)
> Traceback (most recent call last):
>   File "<pyshell#30>", line 1, in <module>
>     settings.value('list_value3',[],type=list)
> TypeError: unable to convert a QVariant of type 9 to a QMetaType of type 1024
> >>> settings.value('list_value3',defaultValue = [],type=list)
> Traceback (most recent call last):
>   File "<pyshell#32>", line 1, in <module>
>     settings.value('list_value3',defaultValue = [],type=list)
> TypeError: unable to convert a QVariant of type 9 to a QMetaType of type 1024
> >>>

Hopefully fixed in tonight's snapshot.

In the meantime type='QVariantList' should work.

Phil
_______________________________________________
PyQt mailing list    PyQt@riverbankcomputing.com
https://www.riverbankcomputing.com/mailman/listinfo/pyqt
[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic