Skip to content

Use non-deprecated QMouseEvent signatures#2509

Merged
j9ac9k merged 1 commit intopyqtgraph:masterfrom
j9ac9k:fix-qmouseevent-deprecations
Oct 29, 2022
Merged

Use non-deprecated QMouseEvent signatures#2509
j9ac9k merged 1 commit intopyqtgraph:masterfrom
j9ac9k:fix-qmouseevent-deprecations

Conversation

@j9ac9k
Copy link
Copy Markdown
Member

@j9ac9k j9ac9k commented Oct 28, 2022

In Qt 6.4, the QMouseEvent signature we were using has been deprecated. To work around it, we get the global mouse position by using widget.mapToGlobal(pos), which gives us the global_position. This feels a bit hacky, but if it is stupid and it works, it is not stupid.

@j9ac9k j9ac9k force-pushed the fix-qmouseevent-deprecations branch 2 times, most recently from c379a89 to 314afed Compare October 28, 2022 04:58
@j9ac9k
Copy link
Copy Markdown
Member Author

j9ac9k commented Oct 28, 2022

Would love to know what's triggering the segfault on linux + pyside6 6.4; if anyone can replicate locally please let me know...

In Qt 6.4, the QMouseEvent signature we were using has been deprecated.
To work around it, we get the global mouse position by using
widget.mapToGlobal(pos), which gives us the global_position.  This feels
a bit hacky, but if it is stupid and it works, it is not stupid.
@j9ac9k j9ac9k force-pushed the fix-qmouseevent-deprecations branch from 314afed to 71612fd Compare October 29, 2022 00:18
@j9ac9k j9ac9k merged commit 233374a into pyqtgraph:master Oct 29, 2022
@j9ac9k j9ac9k deleted the fix-qmouseevent-deprecations branch October 29, 2022 01:51
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 this pull request may close these issues.

1 participant