WId windowObject = this->winId(); objc_object* nsviewObject = reinterpret_cast(windowObject); objc_object* nsWindowObject = ((id (*)(id, SEL))objc_msgSend)(nsviewObject, sel_registerName("window")); int NSWindowCollectionBehaviorCanJoinAllSpaces = 1 << 0; ((id (*)(id, SEL, int))objc_msgSend)(nsWindowObject, sel_registerName("setCollectionBehavior"), NSWindowCollectionBehaviorCanJoinAllSpaces); // Ignore mouse events on Mac // Qt::WindowTransparentForInput bug // https://bugreports.qt.io/browse/QTBUG-45498 ((id (*)(id, SEL, bool))objc_msgSend)(nsWindowObject, sel_registerName("setIgnoresMouseEvents"), true);