diff --git a/5.6.1/qtbase/src/plugins/platforms/cocoa/qnsview.mm b/5.6.1/qtbase/src/plugins/platforms/cocoa/qnsview.mm index 0d58faa..438198f 100644 --- a/5.6.1/qtbase/src/plugins/platforms/cocoa/qnsview.mm +++ b/5.6.1/qtbase/src/plugins/platforms/cocoa/qnsview.mm @@ -681,6 +681,16 @@ QT_WARNING_POP return YES; } +- (NSView *)hitTest:(NSPoint)aPoint +{ + NSView *candidate = [super hitTest:aPoint]; + if (candidate == self) { + if (m_window && (m_window->flags() & Qt::WindowTransparentForInput)) + return nil; + } + return candidate; +} + - (void)convertFromScreen:(NSPoint)mouseLocation toWindowPoint:(QPointF *)qtWindowPoint andScreenPoint:(QPointF *)qtScreenPoint { // Calculate the mouse position in the QWindow and Qt screen coordinate system,