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

QCoreApplication aboutToQuit not defined as signal #4

Closed
karlch opened this issue Jan 20, 2019 · 6 comments · Fixed by #46
Closed

QCoreApplication aboutToQuit not defined as signal #4

karlch opened this issue Jan 20, 2019 · 6 comments · Fixed by #46

Comments

@karlch
Copy link
Contributor

karlch commented Jan 20, 2019

First of all thanks a bunch for your work on this!

When connecting to the aboutToQuit signal in QCoreApplication mypy complains with:

"Callable[[], None]" has no attribute "connect"

I suspect this is because it is simply defined as a function in the stub, not as a signal. Is there any reason for this or could this be changed?

@stlehmann
Copy link
Collaborator

Thanks for the feedback. The upstream PyQt5 stubs type-annotate signals as functions. They need to be changed to the type pyqtSignal. I will change this right away. If you discover any more such issues feel free to make a PR or report.

@stlehmann
Copy link
Collaborator

Fixed with 9e7cbb9

@karlch
Copy link
Contributor Author

karlch commented Jan 22, 2019

Perfect, thanks!

@3rdcycle
Copy link

Fixed with 9e7cbb9

Wait, am I missing something here? This provided a fix for applicationVersion but none of the other signals including the one originally requested (aboutToQuit)? As far as I can see most signal stubs are still simple defs.

@stlehmann
Copy link
Collaborator

You are right. There went something wrong, here. I'll have a look at it.

@3rdcycle
Copy link

That was quick 😃 thanks.

bluebird75 pushed a commit to bluebird75/PyQt5-stubs that referenced this issue Aug 24, 2021
Similar to issue python-qt-tools#4 the signals in this module were defined as functions
by the upstream PyQt5 stubs. This commit fixes this by re-defining them
as signals. In addition the signals in QDialog were updated as it is
used as parent in the print dialog classes.
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 a pull request may close this issue.

3 participants