Skip to content

Fixes T300885 #380

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

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open

Fixes T300885 #380

wants to merge 1 commit into from

Conversation

benapetr
Copy link
Member

replaced this->pos() with this->mapToGlobal(QPoint(0, 0)), which:

  • Converts the widget's local coordinates (0,0) to global screen coordinates
  • Takes into account which screen the widget is currently on
  • Ensures the tooltip appears on the same screen as the application window
  • The method mapToGlobal() is a Qt function that transforms a widget's local coordinates to global screen coordinates. By using this instead of pos(), we're properly accounting for the widget's actual position on the screen where it's displayed.

I created this fix on my laptop only with 1 screen so I couldn't check if it really fixes the issue, it needs to be verified on multi-screen system first before merging

replaced this->pos() with this->mapToGlobal(QPoint(0, 0)), which:

- Converts the widget's local coordinates (0,0) to global screen coordinates
- Takes into account which screen the widget is currently on
- Ensures the tooltip appears on the same screen as the application window
- The method mapToGlobal() is a Qt function that transforms a widget's local coordinates to global screen coordinates. By using this instead of pos(), we're properly accounting for the widget's actual position on the screen where it's displayed.
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