I just tried your solution.

It seems to be working as the button now turns green when I want.
The problem with this is that the shape of all the widget is changed and doesn't have rounded angles anymore.
Cattura1.PNG
Cattura2.PNG
I will keep this as a temporary solution as it is working, but will try also with other ways.

Thanks for all the help!