[Interest] Qt signals and polymorphism

Bob Hood bhood2 at comcast.net
Sun Nov 22 20:51:09 CET 2015


On 11/22/2015 12:01 PM, Thiago Macieira wrote:
> On Sunday 22 November 2015 10:21:45 Bob Hood wrote:
>>       class SubChannel : public Channel
>>       {
>>       ...
>>           SubChannel();
>>
>>       signals:
>>           void signal_channel_clear();
>>       ...
>>       }
> Why are you creating a signal with the same name of a signal that already
> exists? Why can't you use the same signal?

Ah, I see!  There was the "obvious" thing I was missing. For some unknown 
reason, I assumed that signals were not inherited.  I just tested without 
overriding the signal and polymorphism worked as expected.

Nothing to see here but my stupidity.  Move along.  :)

(Thanks again, Thiago.)



More information about the Interest mailing list