|
|
Source code |
1 2 3 4 5 6 7 8 |
class MyWidget : public CoreWidget
{
public:
Common* common() { return m_common; }
private:
Common* m_common;
};
|
|
|
Source code |
1 2 |
class myWidget1: public Common<CoreWidget1>; class myWidget2: public Common<CoreWidget2>; |
Quoted
Originally posted by rpquinn
I would imagine that the Qt developers didn't make the classes virtual for a reason.
Quoted
Originally posted by wysota
Can't you do:
class Common : public QWidget;
class Individual1 : public Common;
class Individual2 : public Common;
etc.?
In Common you implement things which your custom widgets share, and then derive from the class to implement specific parts.
This post has been edited 2 times, last edit by "chickenblood" (Aug 5th 2005, 4:04pm)
Quoted
As for the boost link, it doesn't work.
This post has been edited 2 times, last edit by "chickenblood" (Aug 5th 2005, 4:03pm)