Skip to content
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

ENH: Add propertry for setting Qt Standard Icons in designer #1038

Merged

Conversation

nstelter-slac
Copy link
Collaborator

@nstelter-slac nstelter-slac commented Sep 28, 2023

allow qt standard icons to be set in designer by exposing a custom property that sets the icon using python inside the property's setter.

this should provide a set of default icons cross-platform, since they ship with qt.

Also fix minor spelling mistake in comments.
@nstelter-slac
Copy link
Collaborator Author

nstelter-slac commented Sep 28, 2023

to test:

-pydm examples/shell_command/shell_command.ui
-click on a shell command button
-copy any of the Qt Standard Icons, and set as the button's standardIcon property.
-should update immediately in designer, and in pydm if you re-run shell_command.ui

@klauer
Copy link
Collaborator

klauer commented Oct 27, 2023

Neat! Could this be extended to support the fontawesome stuff built into PyDM as well - pydm.utilities.iconfont? https://github.com/slaclab/pydm/blob/master/pydm/utilities/iconfont.py#L1

@nstelter-slac
Copy link
Collaborator Author

nstelter-slac commented Nov 1, 2023

can demo use of Qt's standard and Font Awesome icons with:

pydm examples/icons/icons.ui

Copy link
Collaborator

@jbellister-slac jbellister-slac left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Created a new display, worked exactly like I'd expect in both right hand window and basic settings editor in designer. Links for the valid icon names for both sets are good, example is helpful, and tests look good too. Thanks!

@jbellister-slac jbellister-slac merged commit e1dcbe0 into slaclab:master Nov 4, 2023
13 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Request to fix a bug that stops develops from changing icons on related displays in designer.
3 participants