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

Button cb enhance #253

Merged
merged 2 commits into from
Nov 16, 2023
Merged

Button cb enhance #253

merged 2 commits into from
Nov 16, 2023

Conversation

j8xixo12
Copy link
Collaborator

I have modified push button clicked callback function to fit the function signature.

I also add Slot decorator to each button callback function, because of without Slot decorator may cause worse performance and induce bugs.

Here is the snippets of PySide6 document:

We recommend marking all methods used by signal connections with a @QtCore.Slot() decorator. Not doing causes run-time overhead due to the method being added to the QMetaObject when creating the connection. This is particularly important for QObject classes registered with QML, where missing decorators can introduce bugs.

Modify button event callback to fit buttton callback function signature.
Also, add Slot decorator, according to PySide6 official documentation
recommandation, every callback connected to signal should be indicated
by Slot decorator for good reliability and performance.
@yungyuc
Copy link
Member

yungyuc commented Nov 16, 2023

Thanks, @j8xixo12 . Could you please attach some screenshots to assist review?

@yungyuc yungyuc added viewer Visualize stuff onedim One-dimensional solver labels Nov 16, 2023
Copy link
Member

@yungyuc yungyuc left a comment

Choose a reason for hiding this comment

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

Code looks good but it will be more informative to have screenshots.

@yungyuc yungyuc merged commit 47481ec into solvcon:master Nov 16, 2023
11 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
onedim One-dimensional solver viewer Visualize stuff
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants