Qt_GUI_BG_4_5 - 8BitsCoding/RobotMentor GitHub Wiki

Clicked signal

QFont buttonFont("Times", 20, QFont::Bold);
QPushButton * button = new QPushButton("Button1", this);
button->setMinimumSize(200, 100);
button->setFont(buttonFont);
connect(button, &QPushButton::clicked, [=](){
    qDebug() << "Button pressed";
});

released signal

connect(button, &QPushButton::released, [=](){
    qDebug() << "Button released";
});