dimanche 23 juillet 2017

QCheckbox: stateChanged signal not emitted

I have the following situation in my QT Slot function for stateChanged signal:

void ui::myslot(int state) {
  ...
  if (condition) {
    checkbox->setChecked(true);
  }
  ...
}

In case my checkbox is already checked and when I try to uncheck it, given the condition is fulfilled, the checkbox will be checked again. However, when I try to uncheck it again and the condition is still true, it just becomes unchecked with no signals being emitted. Ie, the function above isn't even called...

Any idea what could be happening here?

Thanks a lot! :)




Aucun commentaire:

Enregistrer un commentaire