Increment the count when ok button is clicked and display it on the button
problem: the count value is incremented by 2;
i have a push buttons by name ok and value;
i hve connected the ok button to slot on_ok_clicked();
i have declared int count variable in my .h file under private:
and assigned a value of 0 in constructor
when am clicking on, ok button the value is incrementing in this way
1,3,5,7,9.............................. and am able to display the value on the button
can u help me where am wrong
this is my code
using namespace std;
Radar::Radar(QWidget *parent) :
It would be really helpful if you could paste some code that illustrates your problem.
My first initial thought is that you might have two instances of the same class increment the same value. Or that a the signal is sending a press and a release. Hard to say without any code.