Hi,

can someone explain this compiler error below?
Qt Code:
  1. #include <QList>
  2.  
  3. class A
  4. {
  5.  
  6. public:
  7. A(){ _list = new QList<A*>(); }
  8. ~A(){ delete _list;}
  9. int indexOfChild(const A* x) const { return _list->indexOf( x, 0); }
  10.  
  11. private:
  12. QList<A*> *_list;
  13. };
To copy to clipboard, switch view to plain text mode 

Qt Code:
  1. a.cpp: In member function `int A::indexOfChild(const A*) const':
  2. a.cpp:9: error: invalid conversion from `const A*' to `A*'
  3. a.cpp:9: error: initializing argument 1 of `int QList<T>::indexOf(const T&,
  4. int) const [with T = A*]'
To copy to clipboard, switch view to plain text mode 

Why takes the conversion from 'const A*' to 'A*' place?
if T = A*
this is
int QList<A*>::indexOf(const A*&, int) const
But A*& ??

References and pointers....

Can someone enligthen me, please?

Thanks,

Moppel