MCPcopy Create free account
hub / github.com/Liniyous/ElaWidgetTools / containsCursorToItem

Method containsCursorToItem

ElaWidgetTools/ElaApplication.cpp:156–168  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

154}
155
156bool ElaApplication::containsCursorToItem(QWidget* item)
157{
158 if (!item || !item->isVisible())
159 {
160 return false;
161 }
162 auto itemRect = QRect(item->mapToGlobal(QPoint(0, 0)), item->size());
163 if (itemRect.contains(QCursor::pos()))
164 {
165 return true;
166 }
167 return false;
168}

Callers 1

hidePopupMethod · 0.80

Calls

no outgoing calls

Tested by

no test coverage detected