[Interest] error connecting signals

Giuseppe D'Angelo dangelog at gmail.com
Tue May 7 14:46:20 CEST 2013

Hi, please keep the discussion on the list.

On 7 May 2013 14:08, Adrian Stern <adrian.stern at screenfood.com> wrote:
> It was in the VideoPlayer whil it wasn't working. Now that it is in PlayerBase it is working.
> Why?

Because, as you said, VideoPlayer was lacking the Q_OBJECT macro.

Rule of thumb: put Q_OBJECT in each and every QObject subclass.

> And why can I cast a VideoPlayer to a PlayerBase but not in the other direction?

What do you mean? You can always cast "for free" to a base*, but you
need an explicit cast to go towards a derived class.

Giuseppe D'Angelo

*unless you're inheriting from it multiple times and stuff like this

More information about the Interest mailing list