Quote Originally Posted by OnionRingOfDoom
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 
I 'd suggest a timer and updating the graph each time it times out. Don't use the while loop especially since it's not necessary as the event loop will be blocked and you'll have to processEvents() if you use it.

Edit: I only show the last post and Weaver has suggested the same thing