You never stop the timer, so it keeps firing.
You can stop the timer in HelloForm::stopi2c() or connect the stop button's cliicked signal to the timer's stop() slot.
Cheers,
_
You never stop the timer, so it keeps firing.
You can stop the timer in HelloForm::stopi2c() or connect the stop button's cliicked signal to the timer's stop() slot.
Cheers,
_
@anda_skoa
and how can i do that sir......i really have don't idea about it...
please guide me to it.
You are kidding right?
I already gave you two options and you want more?
Cheers,
_
sir,
i mean to say how to write in stopi2c() to stop this if you add lines in my code i will be oblize to you..
like this??Qt Code:
void HelloForm::stopi2c() { ADC->setText(" "); ptimer->stop(); Message->setText("Stopped"); }To copy to clipboard, switch view to plain text mode
if yes then i doesn't work
Yes, like this.
But obviously with having "timer" as a member variable of class HelloForm instead of just a local variable in the constructor.
Cheers,
_
gauravsharma0190 (3rd July 2015)
so how can i do that sir...please tell me so???
where should i change..
if you don't mind??
My recommendation is to have a look at some beginner's C++ tutorials first.
Once you understand the absolut basics of C++, you won't have any difficulty making the necessary change.
Cheers,
_
hello sir,
i did it...
now i want to do it with startTimer() and killTimer()
so how can i do it with???
Bookmarks