In the designer,
- add Push Button to the form
- right click the Push Button
- select “Go to slot…”
- select “clicked()” signal
- done
The terms are different from .NET, so in this case we are talking about signals and slots, and the signal emitted when QPushButton is clicked is called clicked()
instead of OnClick
.
Reading the Qt’s documentation about signals and slots is recommended.