-
-
Notifications
You must be signed in to change notification settings - Fork 108
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Selected
option doesn't change QPushButton
icon only icon color
#237
Comments
Hi @r-bash thank you for checking out QtAwesome! Regarding what you want to achieve, I think the kwarg that needs to be passed is # Toggle
toggle_icon = qta.icon('fa5s.home', active='fa5s.balance-scale',
color_off='black',
color_off_active='blue',
color_on='orange',
color_on_active='yellow')
toggle_button = QtWidgets.QPushButton(toggle_icon, 'Toggle')
toggle_button.setCheckable(True) With that you should see something like: Some other examples that show this behavior are the piece of code commented as Note: Not totally sure if this should be modified in the example or if there is an issue with the |
There could be. So, what does the |
Hoped you would know 😅 , but anyhow I will give this a more in dept check then 👍 From a quick check seems like two different icon modes one for when the icon is clicked or hovered and the other when is actually selectable/selected 🤔 |
Haha, sorry, no idea! |
Hi @dalthviz and @ccordoba12! Big thank you for a quick response 😃 Okay, so I thought that "selected" for an icon means the same as "checked" for a button. So if the button is Under "selected" mode I understand that if for example we have two groups of buttons and basicaly they are working like a radio buttons ( I am thinking that "Active" works differently. I am not sure and please correct me if I am wrong but I think that "active" mode keeps the icon active all the time till another object will be clicked anywhere. 😅 Please look at below gifs:
|
Thanks for the feedback and testing @r-bash ! Seems more and more to me that we have an issue here with the qtawesome/qtawesome/iconic_font.py Lines 423 to 433 in cd4768d
|
Selected
option doesn't change QPushButton
icon only icon color
Hello,
I've got:
and I am trying to create a QPushButton which will be changing the icon on a "selected" mode/state but unfortunatelly it is not working. In other words, I am trying to create toggle QPushButton. To create the QPushButton I've taken the example from your documentation( https://qtawesome.readthedocs.io/en/latest/usage.html#examples):
Could I ask you for help?
Thanks
The text was updated successfully, but these errors were encountered: