I have a toolbar that I want to turn off when I click on it (if it's on) and turn it on when I click on it (and it's off). The problem is that when I clicked on it, I wrote the corresponding slot and turned off the button. While it works. But as soon as you turn it off and you click on it, it wonβt go into the slot, itβs completely disconnected forever. Am I using the wrong function or the wrong signal?
... bool mEnable = true; void Test::OnEnableButtonTriggered() { mEnable = !mEnable; ui.OnEnable->setEnabled(mEnable); }
source share