TheKedge
18th January 2007, 11:09
Hello all,
I'd like to make a abstract base class with one pure virtual function. Let's say it looks like this:
class BuddyBase : public QWidget
{
public:
BuddyBase(QWidget* parent = 0);
virtual ~BuddyBase();
public:
virtual void update (QString text) = 0;
I'd like to inheirit this, making a class that (of course) implements its own update(). But, I'd like to have
update(double*), or, in some other case update(QVector), for instance.
How can I do it?
Do I have to declare
virtual void update(class <T>)=0;
or something?
Will this be ok with the inheiritance of QWidget?
thanks
Kev
I'd like to make a abstract base class with one pure virtual function. Let's say it looks like this:
class BuddyBase : public QWidget
{
public:
BuddyBase(QWidget* parent = 0);
virtual ~BuddyBase();
public:
virtual void update (QString text) = 0;
I'd like to inheirit this, making a class that (of course) implements its own update(). But, I'd like to have
update(double*), or, in some other case update(QVector), for instance.
How can I do it?
Do I have to declare
virtual void update(class <T>)=0;
or something?
Will this be ok with the inheiritance of QWidget?
thanks
Kev