PDA

View Full Version : Multiple inheritance problem



DURGAPRASAD NEELAM
6th November 2014, 11:51
Hi,
recently I have been asked one question in an interview.

if I write multiple inheritance as below.

class B1 : public QObject {}
class B2 : public QObject {}
class D : public B1, public B2 {}

is there any problem with signal slot mechanism ??

I know ambiguity will come into picture, please let me know what is the solution for this ?

Thanks in advance.

wysota
6th November 2014, 14:49
Such inheritance model is not possible with Qt. QObject cannot be inherited more than once.