can I trap click event on a disabled button?



  • My GUI is a complex control interface for external hardware and there are times where the state of the hardware, or certain user selections as it relates to the state of the hardware, dictate that certain controls and GUI options be disabled. I thought it might be nice to pop-up some informative text explaining why a particular control is disabled if the user tries to click it while it is disabled. Can I trap for click-event even if the button is disabled?



  • Not exactly what you're asking for, but you could set the button's tooltip to display the text explaining why it's disabled when they hover over the button. Clear the tooltip text when you re-enable the button.



  • Ahh hadn't thought of that. I didn't realize tooltips would activate either on a disabled control. I'll give it a try.


Log in to reply
 

Looks like your connection to Qt Forum was lost, please wait while we try to reconnect.