[closed] how to inherit QObject type class from template type class.??
-
Hello everyone,
As a requirement, i need to inherit [derive] a class, which has signal-slot functionality [i.e inherited from QObject], from a template type class.
when i wrote a code for this but compiler gave me an error.is this not possible.???
-
You might be interested in "this thread":http://developer.qt.nokia.com/forums/viewthread/14058/
It looks like you try to do the same thing. -
this is my older thread. :P
hmmm, yeah the problem is same... i know the solution like to create a class [derived from QObject] and then to derive a template class from it.
but my question is regarding the reverse situation. to derive a class from QObject and from template class.
@
// -- template class header file ----------------------------
template <typename T>
class templateClass
{}
// -- derived class header file ------------------------------
#include <QObject>class derivedClass : public QObject, public templateClass
{
Q_OBJECTsignals:
someSignalspublic slots:
someSlots
}
@Edit: please use @ tags around code sections; Andre
-
I am closing this topic. You already have a topic on this question, and that topic clearly explains why this is not possible. Just opening another topic with the same question is not going to help you solve this. Continue the older topic if you have more questions left.