Skip to content

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