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

Expose QSocketNotifier for Qt5 #63

Merged
merged 1 commit into from
Feb 4, 2018

Conversation

pieper
Copy link
Member

@pieper pieper commented Feb 4, 2018

Apparently a bug in the generator (not yet identified)
results in QSocketNotifier being only partially
wrapped and new instances cannot be created from python
and the following error instead:

>>> qsn = qt.QSocketNotifier()
Traceback (most recent call last):
  File "<console>", line 1, in <module>
ValueError: No constructors available for QSocketNotifier

This patch copies over the generated code from the Qt4.8
version and works around the issue until the generator
issue can be identified.

Apparently a bug in the generator (not yet identified)
results in QSocketNotifier being only partially
wrapped and new instances cannot be created from python
and the following error instead:

>>> qsn = qt.QSocketNotifier()
Traceback (most recent call last):
  File "<console>", line 1, in <module>
ValueError: No constructors available for QSocketNotifier

This patch copies over the generated code from the Qt4.8
version and works around the issue until the generator
issue can be identified.
@pieper
Copy link
Member Author

pieper commented Feb 4, 2018

I posted this to the PythonQt forum so we'll see if anyone knows a better solution.

https://sourceforge.net/p/pythonqt/discussion/631392/thread/c989429c/

If we don't like the idea of patching the generated code, another workaround for me would be to add a qSlicerSocketNotifer in Slicer and make sure that is wrapped correctly. But fixing this PR seemed like the more generally useful solution.

@jcfr
Copy link
Member

jcfr commented Feb 4, 2018

Thanks @pieper , this looks like a reasonable solution 👍

@jcfr jcfr merged commit 30d788f into commontk:patched-8 Feb 4, 2018
@jcfr
Copy link
Member

jcfr commented Feb 4, 2018

Also added a note to the README file. See f04eb5f

pieper added a commit to commontk/CTK that referenced this pull request Feb 8, 2018
jamesobutler pushed a commit to jamesobutler/PythonQt that referenced this pull request Dec 12, 2023
* Remove spaces from environment variable setting because it only works without spaces
jcfr pushed a commit to jcfr/PythonQt that referenced this pull request Jan 31, 2024
* Remove spaces from environment variable setting because it only works without spaces

(cherry picked from commit MeVisLab/pythonqt@aa132d2)
jcfr pushed a commit that referenced this pull request Jan 31, 2024
* Remove spaces from environment variable setting because it only works without spaces

(cherry picked from commit MeVisLab/pythonqt@aa132d2)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Development

Successfully merging this pull request may close these issues.

2 participants