Hi Guys! I’m new to this community and to programming in python at all, so don’t judge me for stupid questions
I’m trying to create one script for Maya and which will use similar functionality to PS layers visibility with eye icon.
So basically I’m using QPushButton class with icon. And I want to change this eye icon when button is clicked.
I’m using two icons (opened eye and closed eye) and function to connect button.setIcon(), but I can’t find what state or flag should I use to query which icon is used.
Here is my code :
Hi, thank you for your answer.
I’ve tried to use self.visButton.icon() , but somehow it doesn’t work… It should actually, but doesn’t. And I don’t know why.
Probably I’ll try to use checkbox solution.
Thanks!
Hi, I’ve decided to use CSS style sheet and it only works if I write direct path to my images (like C:/projects/… ).
But I don’t know how to use my working root directory {image: url(???//res//checked.png);}
If you could help me how to set up my working root directory, that would be great!
Thanks