Add QObject inheritance.