Reputation: 11
I have two QSlider
-s/QSpinBox
-es. Got those working but not sure about the best way of adding the two together to output the total.
Here is a picture of what I got:
Upvotes: 0
Views: 89
Reputation: 156
You need to connect signals form the sliders and spinboxes to slots in your main widget (or some other QObject derived class). Doing this allows your main widget to be informed whenever they are changed, do the addition, and output the result where you want. Check out some of the tutorials included with Qt for more info.
Upvotes: 1