Hey there guys, maybe it´s a simple task but it´s driving me a little bit crazy, especially QTime.
I´m learning minute by minute but sometimes I just need to ask something as I really need help.
What I would like to do is:
1- Press START button and every ´x´ seconds the MAIN FUNCTION is called, exactly like I would do in a for cycle and it must stop when I click STOP.
2- Press STOP button and I exit the loop;
Right now I have this:
void MainWindow::on_pushButton_START_clicked()
{
... here is the button that I want to use to START the loop of the main function. Every ´x´ seconds MAIN FUNCTION loops.
}
void MainWindow::on_pushButton_STOP_clicked()
{
... here is the button that I want to use to STOP the loop of the main function...
}
void MainWindow::on_pushButton_MAIN_FUNCTION_clicked()
{
... here is the function I want to loop...
}
void MainWindow::on_pushButton_START_clicked()
{
... here is the button that I want to use to START the loop of the main function. Every ´x´ seconds MAIN FUNCTION loops.
}
void MainWindow::on_pushButton_STOP_clicked()
{
... here is the button that I want to use to STOP the loop of the main function...
}
void MainWindow::on_pushButton_MAIN_FUNCTION_clicked()
{
... here is the function I want to loop...
}
To copy to clipboard, switch view to plain text mode
Bookmarks