progress bar - Qt4 - The same connect for different progressBar, emit make the same value for each -


i have multiple qprogressbar* connect follow :

void mainwindow::newprogressbar() {     qprogressbar *progressbar = new qprogressbar();      qobject::connect(this, signal(changeprogressbarvalue(int)), progressbar, slot(setvalue(int)));      emit changeprogressbarvalue((_table->item(newrow, 3)->text().todouble() - _table->item(newrow, 2)->text().todouble()) / _table->item(newrow, 3)->text().todouble() * 100); } 

the problem if emit changeprogressbarvalue(52), progressbars take value 52.

i don't know how many progress bar there be. 0 or hundred.

how can make specific "listener / connect" each ? don't want create signal each, there must easier way.

since have specific qprogressbar want set value of call:

progressbar->setvalue(52) 

Comments

Popular posts from this blog

matlab - Deleting rows with specific rules -

jquery - How would i go about shortening this code? And to cancel the previous click on click of new section? -