On 4/3/2013 2:21 PM, Linos wrote:
> Hello,
>       is this behavior intended?

...

> So they are "equal", it seems a bit strange to me given one isNull, the other
> have a value and the two variants don't even have the same types, after change
> the value of not_null to 0.01 they are not equal.

QVariant() treats anything that ends up as "zero" as being "null".

Note that QVariant(QVariant::Int) creates a QVariant with zero as the 
value, so it's null.

If you are looking for an "uninitialized" QVariant, use isValid().
_______________________________________________
Interest mailing list
[email protected]
http://lists.qt-project.org/mailman/listinfo/interest

Reply via email to