Because the pItem is actually only a QGraphicsItem. It does not now about your signal.
Change the type of pItem to CCanGraphicsItem.
Because the pItem is actually only a QGraphicsItem. It does not now about your signal.
Change the type of pItem to CCanGraphicsItem.
Ooops![]()
How I didn't notice that?!
Regards,
Steve
I don't think this is a problem, at least not during compile time.
steg90: What exactly is the error?
The error was most likely QObject::connect no such signal...etc
I wouldn't call that a conversion errorI expected a "Cannot convert ..." message.
Hi guys,
Exact error was :
\CanScene.cpp(17) : error C2664: 'bool QObject::connect(const QObject *,const char *,const QObject *,const char *,Qt::ConnectionType)' : cannot convert parameter 1 from 'QGraphicsItem *' to 'const QObject *'
1> Types pointed to are unrelated; conversion requires reinterpret_cast, C-style cast or function-style cast
Regards,
Steve
Oh, yes in that case changing the type will help, because QGraphicsItem is not a QObject thus it can't be used with connect().
Bookmarks