Closed hayg25 closed 4 years ago
I would suggest to create your own button class that inherits from TaurusCommandButton
and possibly call setStyleSheet()
(see QWidget's stylesheets API) to change the button colors for your own widget, not for the TaurusCommandButton
... and all the specific logic that you want can be implemented by reimplementing the onClicked
method of the TaurusCommandButton
dear @cpascual, thx for the solution. Indeed, that's "elegant" solution. In my mind it was needed to prevent to make it as with 2 graphical objects : one led + one button.
Dear All, I would like to update the TaurusCommandButton accordingly to the value of a Ds attribute (False or True), and which does 2 thinks : 1) Switch ON/OFF by clicking on it (and update the color at the same time) 2) shows by the color (and text) the status (updates with the value of the attribute)
Thanks for the feedback