disabling the signal event
hello.....
can we disable the SIGNAL for some specific time & then enable it in real time ?
For Eg:
connect(ui->pushButton, SIGNAL(clicked()), this, SLOT(clicked()));
I want to disable the clickced SIGNAL for specific time & then re-eanble it;
When the SIGNAL is disabled, if the user clicks on the button no SIGNAL should be called.
Re: disabling the signal event
take a look at QObject::disconnect()
Re: disabling the signal event
i want to disable SIGNAL((valueChanged (int))) of QSpinbox,
but when i tried to use the code:
Code:
ui->spinBox->disable()
it is not showing option for (valueChanged (int)), it is applicable for tthis SIGNAL
Re: disabling the signal event
As MrD. suggested, you have to do this:
disconnect(ui->spinBox, SIGNAL(valueChanged (int)), 0, 0);
You may read the QObject Class Reference for more info about this.
Re: disabling the signal event
If you want to block all signals of particular control use function.
Re: disabling the signal event
Quote:
Originally Posted by
navi1084
If you want to block all signals of particular control use
function.
thanks navi, it s exactly what i wanted. :)
Re: disabling the signal event
But you can also perform your task through disconnect also.