O'Reilly logo

Game Programming using Qt 5 Beginner's Guide - Second Edition by Lorenz Haas, Witold Wysota, Pavel Strakhov

Stay ahead with the world's most comprehensive technology and business learning platform.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, tutorials, and more.

Start Free Trial

No credit card required

Time for action – Creating an event handler

Let's implement the last bit of functionality. When the user clicks on the Reset button, we should change the form's values. Go back to the form editor and right-click on the reset button in the Navigator or in the main area. Select Add New Signal Handler. Qt Creator will navigate to the corresponding implementation file (Calculator.qml) and display the Implement Signal Handler dialog. Select the clicked signal in the drop-down list and click on the OK button to confirm the operation. This operation will do two things:

  • The reset button will be automatically exported as a public property, just like we did it manually for the other controls
  • Qt Creator will create a boilerplate for the new signal ...

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, interactive tutorials, and more.

Start Free Trial

No credit card required