[PyQt] TypeError: unable to convert a QVariant of type 9 to a QMetaType of type 1024

Zhao Lee redstone-cold at 163.com
Sat Mar 25 07:05:39 GMT 2017





>>> 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
>>>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://www.riverbankcomputing.com/pipermail/pyqt/attachments/20170325/b7f8964f/attachment.html>


More information about the PyQt mailing list