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

Implementing signals and slots #44

Open
nikhil-sethi opened this issue Apr 13, 2021 · 0 comments
Open

Implementing signals and slots #44

nikhil-sethi opened this issue Apr 13, 2021 · 0 comments
Labels
bug Something isn't working

Comments

@nikhil-sethi
Copy link

I'm trying to implement a custom signal and slot but there seem to be a few errors.
I can't inherit from QObject(which seems to be the recommended way) as it doesn't exist. This example throws:
AttributeError: module 'PythonQt.QtCore' has no attribute 'QObject'
The discussion here doesn't seem to be resolved either.

If I do it without classes like so:

from PythonQt.QtCore import Signal
def slot():
    print("something")
sig = Signal("QVariant") # also tried without QVariant
sig.connect(slot)
sig.emit()

It results in a crash due to segmentation fault.
I'm new to Qt itself so would love any suggestions/right way of doing things. Thank You.

@mrbean-bremen mrbean-bremen added the bug Something isn't working label Dec 15, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

2 participants