QDial - loops
-
Hello, I made a Program with just a basic QDial and a progressBar, I have included some code below. I'm just having a hard time with the loops, if that's what I should do? I have 0 as default, and 100 as maximum.. Thanks, =).
@
connect(ui->dial, SIGNAL(sliderMoved(int)), ui->progressBar, SLOT(update()));// Should I add a separate update function? Program1::update()
{
// Very confused here, the person who has been helping me hasn't been around, =/.
}
for (i-0; i<=100; i++); // Not sure if I should use i<100 or i<=100;
{
// This is where I'm stuck at..
}
@Edit: replaced code tags for @ tags, as they work better in the forum section; Andre
-
Hi Richard,
if you want the value of the dial in the progress bar, you need another connect statement:
@
connect(ui->dial, SIGNAL(sliderMoved(int)), ui->progressBar, SLOT(setValue(int)));
@ -
What exactly are you wanting to do in the loop?