I have a QAction item that I initialize like follows:
QAction* action = foo->addAction(tr(\"Some Action\")); connect(action, SIGNAL(triggered()), this, SL
Without "this" context, e.g. from main():
int main(int argc, char *argv[]) { QApplication a(argc, argv); QLabel lbl{"Hello World!"}; QPushButton btn; btn.show(); lbl.show(); QObject::connect(&btn, &QPushButton::clicked, [&lbl](){lbl.setText("Button clicked");}); return a.exec(); }