Important: Please read the Qt Code of Conduct - https://forum.qt.io/topic/113070/qt-code-of-conduct
jasig last edited by
I'm declaring a class as given below
class Foo : public Object
Foo(Object* parent = 0);
void setName(QString name); QString name();
and registered it this way
however the equality operator never get's called when i compare two QVariants that contain Foo*.
Please advise what I'm doing wrong.
[edit: added missing coding tags @ SGaist]
AFAIK, you are providing comparators for Foo not Foo*, so it's comparing the pointer values.
On a side note, please provide correct code sample, this one doesn't allow to test your problem