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

Qt: Fix event forwarding for native popups #7609

Merged
merged 2 commits into from
Feb 11, 2025
Merged

Qt: Fix event forwarding for native popups #7609

merged 2 commits into from
Feb 11, 2025

Conversation

ogoffart
Copy link
Member

So that popup menus can handle hover events.

This also remove some of the code in the qt backend that used the private API

So that popup menus can handle hover events.

This also remove some of the code in the qt backend that used the
private API
@ogoffart ogoffart requested a review from tronical February 11, 2025 15:14
auto pos = event->pos();
if (auto p = dynamic_cast<const SlintWidget*>(parent()); p && !rect().contains(pos)) {
while (auto pp = dynamic_cast<const SlintWidget*>(p->parent())) {
if (p->rect().contains(p->mapFromGlobal(event->globalPosition().toPoint())))
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

QMouseEvent::globalPosition is new in Qt6. But QMouseEvent::globalPos is deprecated.
I guess i need to make a #ifdef dance to avoid the deprecated warning.

@ogoffart ogoffart merged commit 22317d2 into master Feb 11, 2025
38 checks passed
@ogoffart ogoffart deleted the olivier/qt branch February 11, 2025 16:11
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.

2 participants