Skip to content

Add support for signals #18

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

Merged
merged 2 commits into from
Apr 8, 2020
Merged

Add support for signals #18

merged 2 commits into from
Apr 8, 2020

Conversation

Djedouas
Copy link
Contributor

@Djedouas Djedouas commented Nov 5, 2019

All pyqt signals are now typed as such

All pyqt signals are now typed as such
@Djedouas
Copy link
Contributor Author

Djedouas commented Nov 5, 2019

I ran into a problem when connecting QMenu().aboutToShow() signal :
projectMenu.aboutToShow.connect(self.controller.saveSettings)

Which creates a mypy error:
news_view.py:93:9: error: "Callable[[], None]" has no attribute "connect"

So I decided to patch all others signals in QtWidgets.pyi, like it was already done for QAbstractButton

@The-Compiler
Copy link
Collaborator

Did you automate this in some way? Why only QtWidgets.pyi?

@Djedouas
Copy link
Contributor Author

Djedouas commented Nov 5, 2019

It's handmade. That's why it's only QtWidgets.pyi.
Therefore it can not be considered completely exhaustive, like before.

@stlehmann stlehmann merged commit 5c90a94 into python-qt-tools:master Apr 8, 2020
@stlehmann
Copy link
Collaborator

Thanks for your effort of manually adding the signals. I know that's a tedious work. I would like to have a way to automate this stuff. Thanks again :)

@Djedouas
Copy link
Contributor Author

Djedouas commented Apr 8, 2020

Thanks a lot!
Happy to participate ;-)

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.

3 participants