<div dir="ltr">I'm using @pyqtProperty(QtCore.QVariant) for the list property and it works as long as I do .toVariant() in the setter.<div><br></div><div>One thing is that it calls the setter twice for each instance in this example. I believe it should only call each setter once. </div><div><br></div><div><a href="https://gist.github.com/Siecje/d1f2b270305762b4f73540c72adee6b8">https://gist.github.com/Siecje/d1f2b270305762b4f73540c72adee6b8</a><br></div><div><br></div><div><br></div></div><div class="gmail_extra"><br><div class="gmail_quote">On Fri, Jan 13, 2017 at 9:04 AM, Cody Scott <span dir="ltr"><<a href="mailto:cody@perspexis.com" target="_blank">cody@perspexis.com</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div dir="ltr">So what type should the @<span style="color:rgb(121,93,163);font-family:consolas,"liberation mono",menlo,courier,monospace;font-size:12px;white-space:pre-wrap">pyqtProperty</span> have for lists of other types? For example a list of strings?</div><div class="HOEnZb"><div class="h5"><div class="gmail_extra"><br><div class="gmail_quote">On Fri, Jan 13, 2017 at 6:53 AM, Phil Thompson <span dir="ltr"><<a href="mailto:phil@riverbankcomputing.com" target="_blank">phil@riverbankcomputing.com</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div class="m_8756575849906029498HOEnZb"><div class="m_8756575849906029498h5">On 12 Jan 2017, at 9:05 pm, Cody Scott <<a href="mailto:cody@perspexis.com" target="_blank">cody@perspexis.com</a>> wrote:<br>
><br>
> I'm using PyQt5==5.7.1.<br>
><br>
> I'm trying to set a list property from QML. I'm using @pyqtProperty(QQmlListProperty<wbr>)<br>
> I'm getting an error that TypeError: list element must be of type 'str', not 'NoneType' but they are strings in QML.<br>
><br>
> After that I get a SIGABRT.<br>
><br>
> Code and output here.<br>
> <a href="https://gist.github.com/Siecje/0a6cb1b49358f9373496bd8952bfd1fd" rel="noreferrer" target="_blank">https://gist.github.com/Siecje<wbr>/0a6cb1b49358f9373496bd8952bfd<wbr>1fd</a><br>
><br>
> The gist and the attached file are the same.<br>
<br>
</div></div>QQmlListProperty can only handle lists with elements that are sub-types of QObject.<br>
<br>
I've improved the error checking.<br>
<span class="m_8756575849906029498HOEnZb"><font color="#888888"><br>
Phil</font></span></blockquote></div><br></div>
</div></div></blockquote></div><br></div>