Dear visitor, welcome to QtForum.org. If this is your first visit here, please read the Help. It explains in detail how this page works. To use all features of this page, you should consider registering. Please use the registration form, to register here or read more information about the registration process. If you are already registered, please login here.
|
|
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)