I am trying to capture the mouse release event in a widget ensuring that the mouse was previously pressed in same widget. mouseReleaseEvent is successfully called but I don't know what to do with the parameter QMouseEvent to check if the position of the mouse is inside the widget. My current code:
void DeviceWidget::mouseReleaseEvent(QMouseEvent* e)
{
if (_mouseClick)
{
_mouseClick = false;
emit mouseClick(_deviceInformation);
}
}
Thank you so much,