Define the updateRotation() slot method to read the rotation sensor data and to output data to the screen when the reading is changed by adding the following lines to sensorsapidialog.h:
Connect the readingChanged signal of the rotationSensor to the updateRotation slot method by adding the following line of code to the constructor in sensorsapidialog.cpp:
Implement the updateRotation() method in sensorsapidialog.cpp to read the rotation sensor data and to output data to the screen: