Hello,
is this behavior intended?
main.cpp
#include <iostream>
#include <QtCore/QVariant>
int main(int argc, char *argv[])
{
QVariant null_valid(QVariant::Int);
QVariant not_null(0.0);
bool are_equal = (null_valid == not_null);
std::cout << are_equal << std::endl;
std::cout << null_valid.type() << std::endl;
std::cout << not_null.type() << std::endl;
}
prints this when executed:
1
2
6
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.
Regards,
Miguel Angel.
_______________________________________________
Interest mailing list
[email protected]
http://lists.qt-project.org/mailman/listinfo/interest