No such slot
Something I don't understand about slots i guess . My slot function never gets called .
I see a message that says :
QObject::connect: No such slot Lobby::Lobby::onMyButtonClick() in lobby.cpp:13
class Lobby : public QWidget
Lobby(QWidget *parent = 0);
void keyPressEvent(QKeyEvent * e);
void closeEvent(QCloseEvent * e);
QPushButton *myButton = new QPushButton("button", this);
myButton->setGeometry(50, 40, 75, 30);
connect(myButton, SIGNAL(clicked()), this, SLOT(Lobby::onMyButtonClick()));
Never mind ... I changed Lobby::onMyButtonClick() to onMyButtonClick() and it works now . I originally had onMyButtonClick() and wasn't working either so I am not sure what was the fix though .
The SLOT and SIGNAL function signatures must not contain the class name, only the function name and argument types.