Saturday, August 09, 2014

Qt connect is complaining that it can't find slot in super class when connecting sub class

Got an runtime error in the Qt application we are building, were connecting a signal with a slot, but when running the app we got this error message in the console:
Object::connect: No such slot mgccis::web::SuperClassWebservice::onReadyRead() in ServiceInterface\SubClassWebservice.cpp:37

The connect code in the SubClassWebservice looked like this:

connect(, SIGNAL(readyRead()), this, SLOT(onReadyRead()));

There was a slot in the subClassWebservice, took a google search session to find out the real problem, found this on Stackoverflow:

I've forgot to add the Q_OBJECT in the class declaration of the sub class.

1 comment:

14lmocz9pn said...

When 카지노사이트 you take a look at|have a look at} slots online, although, they become much easier to manage. Caesar’s Empire is packed stuffed with ancient historical inspirations – from its RTG title to its visuals and gameplay. For example, the reel desk is framed by an image of the Roman Colosseum, which is a big image of the empire’s history.