Qt Code:
  1. class A{};
  2. class B : public class A{};
  3. classA * obj = new classB();
  4. // is equal to:
  5. class B *tmp = new classB();
  6. classA *obj = (obj*)tmp;
To copy to clipboard, switch view to plain text mode 

As long as class B inherits class A, you make make such a cast right? And all virtual functions from "obj" will be taken from classB, while all non virtual ones that were defined in classA will be taken from classA.

Because I don't need any features of standard item model while using the proxy, I can cast the pointer to its base class which is needed by the proxy. This was my way of showing that it works with any item model inherited from QAbstractItemModel (I couldn't instantiate a QAbstractItemModel object, as it is pure abstract, like you noted).