Qt c++ Increasing integer with pushButton to label -


i'm trying make simple "cookie clicker" game , i'm having trouble this. when press button want label print out "you have mined (value) fscoins" label won't update reason. console shows no errors :(

here's code:

mainwindow.cpp

void mainwindow::on_pushbutton_clicked(int num, int numplus) {     num = numplus + 1;     qstring qstr = qstring::number(numplus);     ui->label->settext("you have mined " + qstr + " fscoins"); } 

any appreciated, i've started working qt yesterday , i'm "sort of" getting hang of it.

num = numplus + 1; 

what point of line? num local variable never used. did mean pass reference?


Comments

Popular posts from this blog

java - Spring Data JPA: Why findOne(id) executing delete query internally? -

python - Mongodb How to add addtional information when aggregating? -

java - Incorrect order of records in M-M relationship in hibernate -