Hello ,
In code I am trying to implement, that on every button click my data should be reduce.
constructor()
{
connect(ui->pb_uss2ecu_readleft,SIGNAL(clicked()),this,SLOT(Read_File_uss2ecuLeft()));
}
somefunction()
{
uss2ecu_count = 144;
}
Read_File_uss2ecuLeft()
{ qDebug()<<"uss2ecu_count_first"<<uss2ecu_count;
uss2ecu_count--;
qDebug()<<"uss2ecu_count_last"<<uss2ecu_count;
}
constructor()
{
connect(ui->pb_uss2ecu_readleft,SIGNAL(clicked()),this,SLOT(Read_File_uss2ecuLeft()));
}
somefunction()
{
uss2ecu_count = 144;
}
Read_File_uss2ecuLeft()
{ qDebug()<<"uss2ecu_count_first"<<uss2ecu_count;
uss2ecu_count--;
qDebug()<<"uss2ecu_count_last"<<uss2ecu_count;
}
To copy to clipboard, switch view to plain text mode
My output is
First Click
uss2ecu_count_first 144
uss2ecu_count_last 143
second Click
uss2ecu_count_first 189
uss2ecu_count_last 188
That is on every time click it is increasing the data rather than taking old data
My Output should be
First Click
uss2ecu_count_first 144
uss2ecu_count_last 143
second Click
uss2ecu_count_first 143
uss2ecu_count_last 142
Bookmarks