[prev in list] [next in list] [prev in thread] [next in thread]
List: pykde
Subject: Re: [PyQt] QAbstractItemModel::data and invalid QVariant
From: Phil Thompson <phil () riverbankcomputing ! com>
Date: 2017-02-21 9:31:34
Message-ID: 44156816-61B0-4343-BD77-AD291DDD4E6C () riverbankcomputing ! com
[Download RAW message or body]
On 21 Feb 2017, at 5:31 am, Florian Bruhin <me@the-compiler.org> wrote:
>
> Hi,
>
> the Qt docs for QAbstractItemModel::data say[1]:
>
> 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?
The latter.
Phil
_______________________________________________
PyQt mailing list PyQt@riverbankcomputing.com
https://www.riverbankcomputing.com/mailman/listinfo/pyqt
[prev in list] [next in list] [prev in thread] [next in thread]
Configure |
About |
News |
Add a list |
Sponsored by KoreLogic