[PyQt] SIGABRT when setting QQmlListProperty

Phil Thompson phil at riverbankcomputing.com
Fri Jan 13 11:53:45 GMT 2017


On 12 Jan 2017, at 9:05 pm, Cody Scott <cody at perspexis.com> wrote:
> 
> I'm using PyQt5==5.7.1.
> 
> I'm trying to set a list property from QML. I'm using @pyqtProperty(QQmlListProperty)
> I'm getting an error that TypeError: list element must be of type 'str', not 'NoneType' but they are strings in QML.
> 
> After that I get a SIGABRT.
> 
> Code and output here.
> https://gist.github.com/Siecje/0a6cb1b49358f9373496bd8952bfd1fd
> 
> The gist and the attached file are the same.

QQmlListProperty can only handle lists with elements that are sub-types of QObject.

I've improved the error checking.

Phil


More information about the PyQt mailing list