I moved the slot to PlayerBase and it compiles and runs now. I don’t really 
understand why.



Hi

I have a little problem connecting a signal to a slot.

I’ve the following two classes:
DisplayManager which extends QObjects and of course has the Q_OBJECT macro in 
it and
VideoPlayer which extends PlayerBase, IControllable and IPlaceable. PlayerBase 
extends QObject and has the macro in it.

When I try to connect the signal like this:
connect(&vp1, &VideoPlayer::next, this, &DisplayManager::nextVideo);

I get this strange error:
/usr/include/qt/QtCore/qobject.h:221: Fehler:request for member 
'qt_check_for_QOBJECT_macro' is ambiguous
/usr/include/qt/QtCore/qobject.h:239: Fehler:reference to 
'QtPrivate::FunctionPointer<void (VideoPlayer::*)()>::Object {aka 
VideoPlayer}::staticMetaObject' is ambiguous

I don’t see any hint about where to look for a solution.
Thanks in advance.


Freundliche Grüsse / Best Regards / Meilleures salutations
Adrian Stern
Diese E-Mail und ihre Anhänge enthalten vertrauliche und/oder rechtlich 
geschützte Informationen. Wenn Sie nicht der richtige Adressat sind oder diese 
E-Mail irrtümlich erhalten haben, informieren Sie bitte sofort den Absender und 
vernichten Sie diese Mail inklusive Anhänge. Das unerlaubte Kopieren sowie die 
unbefugte Weitergabe der Inhalte dieser Mail ist nicht gestattet.
This e-mail and any attachments may contain confidential and/or privileged 
information. If you are not the intended recipient (or have received this 
e-mail in error) please notify the sender immediately and destroy this e-mail 
including the attachments. Any unauthorized copying, disclosure or distribution 
of the material in this e-mail is strictly forbidden.
Diese E-Mail und ihre Anhänge enthalten vertrauliche und/oder rechtlich 
geschützte Informationen. Wenn Sie nicht der richtige Adressat sind oder diese 
E-Mail irrtümlich erhalten haben, informieren Sie bitte sofort den Absender und 
vernichten Sie diese Mail inklusive Anhänge. Das unerlaubte Kopieren sowie die 
unbefugte Weitergabe der Inhalte dieser Mail ist nicht gestattet.
This e-mail and any attachments may contain confidential and/or privileged 
information. If you are not the intended recipient (or have received this 
e-mail in error) please notify the sender immediately and destroy this e-mail 
including the attachments. Any unauthorized copying, disclosure or distribution 
of the material in this e-mail is strictly forbidden.
_______________________________________________
Interest mailing list
Interest@qt-project.org
http://lists.qt-project.org/mailman/listinfo/interest

Reply via email to