(Qt) Create signal from QButtonGroup of PushButtons?
问题 I am so confused on how this whole thing works. I have some pushbuttons that I put into a group like this: MainWindow::MainWindow(QWidget *parent) : QMainWindow(parent), ui(new Ui::MainWindow) { ui->setupUi(this); AddSlotsToGroup(); } void MainWindow::AddSlotsToGroup() { QButtonGroup* group = new QButtonGroup(this); group->addButton(ui->slot_0); group->addButton(ui->slot_1); //... } And I want to create a slot that gets the id of the button that was clicked in that group. (Sorry if I