workaround PYSIDE-2487 for pen parameter#2844
Merged
j9ac9k merged 3 commits intopyqtgraph:masterfrom Oct 14, 2023
Merged
Conversation
2cd19b7 to
bfee799
Compare
note that the conditions triggering this RuntimeError are different from the condition described in the issue PYSIDE-2487. however the regression is likely from the same commit.
bfee799 to
47a60d8
Compare
ntjess
reviewed
Oct 14, 2023
| except RuntimeError: | ||
| # workaround https://bugreports.qt.io/projects/PYSIDE/issues/PYSIDE-2487 | ||
| # that affects PySide 6.5.3 | ||
| # Since the child param was freshly created by us, there can only have been one slot |
Contributor
There was a problem hiding this comment.
Is it possible to guarantee this with assert p.receivers("_emitValueChanged(object, object)") == 1?
I tried various adaptations of arguments to receivers according to the docs example, but it always returns 0 when I try to test with a MWE. Do you know whether it works in Python? There aren't too many examples online...
Contributor
Author
There was a problem hiding this comment.
For PySide, the syntax is: assert p.receivers(QtCore.SIGNAL("sigValueChanged(PyObject,PyObject)")) == 1
The PySide syntax specific things are:
- PyObject
- QtCore.SIGNAL: PyQt has dropped it since moving to the new signal / slot syntax
Member
|
Thanks @pijyoi ! |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
This PR workarounds a regression in PySide 6.5.3 that affects code in pyqtgraph's pen parameter.
(https://bugreports.qt.io/projects/PYSIDE/issues/PYSIDE-2487)
Note: Qt 6.5 is LTS and PySide 6.5.3 will be the last version to have non-commercial wheels.
Script to demonstrate that the proposed fix does disconnect the slot