MCPcopy Create free account
hub / github.com/WarmUpTill/SceneSwitcher / IsCursorInWidgetArea

Function IsCursorInWidgetArea

lib/utils/ui-helpers.cpp:186–192  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

184}
185
186bool IsCursorInWidgetArea(QWidget *widget)
187{
188 const auto cursorPos = QCursor::pos();
189 const auto widgetPos = widget->mapFromGlobal(cursorPos);
190 const auto widgetRect = widget->rect();
191 return widgetRect.contains(widgetPos);
192}
193
194} // namespace advss

Callers 1

Calls

no outgoing calls

Tested by

no test coverage detected