C++ (Qt)connect(actionConnect, &QAction::triggered, this, &MainWindow::connectSlot);
C++ (Qt)connect(ui->pushButton, &QPushButton::pressed, this, &MainWindow::onPressSlot);
C++ (Qt)void MainWindow::onPressSlot() { int key = QApplication::keyboardModifiers (); ui->label->setText(QString("Pressed button with %1. Text: %2").arg(key, 0, 16).arg(ui->lineEdit->text()));}