Answer the question
In order to leave comments, you need to log in
How to implement multiple inheritance in Qt?
As far as I know, multiple inheritance from two or more classes of the Qt library is prohibited due to the presence of a common ancestor of QObject. Is there any way to get around this limitation? I don't want to use aggregation because I have to write methods to access the aggregated object. Does anyone know an elegant solution to this problem?
Answer the question
In order to leave comments, you need to log in
And only the gang of four say it's better to use aggregation than inheritance....
Inheritance is an architectural trick, not a method of code reuse.
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question