I admit I haven't read the whole post, but it looks like templates are not for you - you can't decide which class to create during runtime, the template argument has to be specified during compilation. But if you think templates are for you, then make some object that is not derived from QObject and make it a member of your class - QObjects can't be templates, but they can have a member pointer that is a base class of a template class.
Qt Code:
class ... { Base *x; }; class Base{}; template .... class X : public Base {...};To copy to clipboard, switch view to plain text mode
Bookmarks