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:
while (i)
{
int amp = window.slider->ampSlider->value();
int freq = window.slider->freqSlider->value();
int sineValue = amp * ( sin(2 * M_PI * freq) * i);
i++;
}
while (i)
{
int amp = window.slider->ampSlider->value();
int freq = window.slider->freqSlider->value();
int sineValue = amp * ( sin(2 * M_PI * freq) * i);
i++;
}
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.
Bookmarks