Is there a way to use QList with pointers like in java ?

I mean if I have somthing like that:
QList<Number *> list;
list.append(new Number(2));
list.append(new Number(4));

and get the correct answer on :
list.contains(new Number(4));

thanx
Eli