If I want to disable a button from being clicked while a GUI function is calculating, is there any difference between using setEnabled(false)
or setDisabled(true)
?
I am just curious why there are two functions that seem to have the same purpose.
They both modify the same property. setDisabled
is just for convenience, for example if you use it as a slot for a toggled signal.
Using setEnabled
and setDisabled
you can either enable or disable a widget by toggling a button/action/checkbox without needing an intermediate slot to invert the value.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With