<div dir="auto">Hey,<div dir="auto"><br></div><div dir="auto">I wouldn't know how this is dealt with underneath but you are describing the changes between pyqt api versions. While previously you had to return valid QVariant objects and now the api is designed to deal with native Python types.</div><div dir="auto"><br></div><div dir="auto">Regards</div><div dir="auto">Jens</div></div><div class="gmail_extra"><br><div class="gmail_quote">On 21 Feb 2017 05:32, "Florian Bruhin" <<a href="mailto:me@the-compiler.org">me@the-compiler.org</a>> wrote:<br type="attribution"><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">Hi,<br>
<br>
the Qt docs for QAbstractItemModel::data say[1]:<br>
<br>
    Note: If you do not have a value to return, return an invalid<br>
    QVariant instead of returning 0.<br>
<br>
Yet returning None from Python seems to work fine. What happens behind<br>
the scenes there? Does PyQt convert the None I return to a null<br>
pointer, or to an invalid QVariant?<br>
<br>
Florian<br>
<br>
[1] <a href="http://doc.qt.io/qt-5/qabstractitemmodel.html#data" rel="noreferrer" target="_blank">http://doc.qt.io/qt-5/<wbr>qabstractitemmodel.html#data</a><br>
<br>
--<br>
<a href="http://www.the-compiler.org" rel="noreferrer" target="_blank">http://www.the-compiler.org</a> | <a href="mailto:me@the-compiler.org">me@the-compiler.org</a> (Mail/XMPP)<br>
   GPG: 916E B0C8 FD55 A072 | <a href="http://the-compiler.org/pubkey.asc" rel="noreferrer" target="_blank">http://the-compiler.org/<wbr>pubkey.asc</a><br>
         I love long mails! | <a href="http://email.is-not-s.ms/" rel="noreferrer" target="_blank">http://email.is-not-s.ms/</a><br>
<br>______________________________<wbr>_________________<br>
PyQt mailing list    <a href="mailto:PyQt@riverbankcomputing.com">PyQt@riverbankcomputing.com</a><br>
<a href="https://www.riverbankcomputing.com/mailman/listinfo/pyqt" rel="noreferrer" target="_blank">https://www.<wbr>riverbankcomputing.com/<wbr>mailman/listinfo/pyqt</a><br></blockquote></div></div>