In a QT program, I have a QWidget class, which is a superclass of another class declared like this:
class Renderer : public QGLWidget { Q_OBJECT .... } class A : public Renderer { .... }
Now I have a slot for class A, which is missing from Renderer, but when I try to run the program, it cannot connect to class A:
Object::connect: <sender name: 'push_button'> Object::connect: <receiver name: 'A'> Object::connect: No such slot Renderer::loadDialog() in <file path>
Why is he trying to connect to Renderer and not A? Should I have a slot in Renderer with the same name?
thanks
edit:
here is the slot declaration in A:
public slots: void loadDialog();
and for connections I rely more on QT Creator, but here is what was in the ui_windows.h file:
QObject::connect(pushButton, SIGNAL(clicked()), A, SLOT(loadDialog()));
Hope that clears up a bit :)
c ++ inheritance signals-slots qt4
confusedKid
source share