Basically your problem is that you are trying to put class A into a plugin but still make it known to the main program. This is not going to work if the class has the Q_OBJECT macro set. You need a common interface for all your classes that you want to load dynamically into the main application.