Well, I'm not really trying to do anything with the label, it was just there for testing purposes. I figured that if I could get that label to work right, then I could get whatever else I wanted to put in the while statement to work. In reality, I'll be using this code:
Qt Code:
  1. while (i)
  2. {
  3. int amp = window.slider->ampSlider->value();
  4. int freq = window.slider->freqSlider->value();
  5. int sineValue = amp * ( sin(2 * M_PI * freq) * i);
  6. i++;
  7. }
To copy to clipboard, switch view to plain text mode 
Or at least something similar to it. In other words, I want it to be giving me the y axis of a sine wave while the program runs, so that it lets me change the amplitude and the frequency using the slider, and updates the sine wave accordingly. The i is there so the sine wave moves along the x axis, resulting in a smooth up and down motion.