How it works...
In this code, you are connecting the valueChanged() signal of each widget with the respective functions so that if the scrollbar or slider handle of the widget is moved, the corresponding function is invoked to perform the desired task. For instance, when the slider handle of the horizontal scrollbar is moved, the scrollhorizontal function is invoked. The scrollhorizontal function displays the value represented by the scrollbar, that is, Sugar Level, through the Label widget. Similarly, when the slider handle of the vertical scrollbar or slider is moved, the scrollvertical function is invoked and the heart rate, the value of the slider handle of the vertical scrollbar, is displayed through the Label widget, as shown in the ...
Become an O’Reilly member and get unlimited access to this title plus top books and audiobooks from O’Reilly and nearly 200 top publishers, thousands of courses curated by job role, 150+ live events each month,
and much more.
Read now
Unlock full access