Fix tests for PySide2 and add PySide2 to CI matrix#484
Merged
Conversation
Contributor
Author
|
Yep, got a segfault, at the same test as I have observed on my machine: Travis CI log: I tried PySide2 from PyPI locally and the segfault happens at the same test. |
Contributor
Author
|
The tests causing the segfault are now fixed. Ready for review. |
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.
Fix #382
Fix #495
Edited message:
The segfault observed was caused by an incorrect use of the
QWheelEventAPI. In Qt4, theQWheelEvent'sposandglobalpostakes aQPointtype (see doc). However, since Qt5,QWheelEventAPI is changed and theposandglobalposareQPointFinstead (see doc, and there are other API changes). For backward compatibility, PySide2/Qt5'sQWheelEventhas an overloaded signature to support both, so that code can migrate. If the signature matches that of Qt4,QPointis expected forposandglobalpos. If the signature matches that of Qt5,QPointFis expected.This can be demonstrated with the following script:
Running this script prints the following:
Note that in PySide6/Qt6, the backward compatibility layer for Qt4 is removed, so we will have to update these tests again. But I will defer that to a separate PR.
Original message: