[PyQt] QAbstractItemModel::data and invalid QVariant
jens.v.han at gmail.com
Tue Feb 21 06:35:45 GMT 2017
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
On 21 Feb 2017 05:32, "Florian Bruhin" <me at the-compiler.org> wrote:
> the Qt docs for QAbstractItemModel::data say:
> Note: If you do not have a value to return, return an invalid
> QVariant instead of returning 0.
> Yet returning None from Python seems to work fine. What happens behind
> the scenes there? Does PyQt convert the None I return to a null
> pointer, or to an invalid QVariant?
>  http://doc.qt.io/qt-5/qabstractitemmodel.html#data
> http://www.the-compiler.org | me at the-compiler.org (Mail/XMPP)
> GPG: 916E B0C8 FD55 A072 | http://the-compiler.org/pubkey.asc
> I love long mails! | http://email.is-not-s.ms/
> PyQt mailing list PyQt at riverbankcomputing.com
-------------- next part --------------
An HTML attachment was scrubbed...
More information about the PyQt