What I want to do is create a function called addObject(const T* ob), then other class call this function to add an instance of a class. Is all the classes in QT inherited from QObject by default? If it is the case, maybe I can change my function to be like following: addObject(QObject * ob). But I doubt that.

If not, how can achieve this? I have tried with addObject(void * ob), seems still couldn't compile, anyone got a clue?