Which header/framework to add to get EventRef type for QT 5.3
mavericks last edited by
Current we are including Carbon.h to get access to the EventRef type so that we can convert it to NSEvents as shown below
nativeEvent(const QByteArray& eventType, void* message,long* result)
EventRef event = reinterpret_cast<EventRef>(message);
NSAutoreleasePool *poolP = [[NSAutoreleasePool alloc] init];
NSEvent *eventP = [NSEvent eventWithEventRef: event];
Is the above code doing correct conversions for EventRef, also is it the right thing to do to include Carbon.h header for the same ?
Qt 5 implements only Cocoa, so you can cast directly to NSEvent
crystalidea last edited by
The doc says:
"On Mac, eventType is set to "mac_generic_NSEvent", and the message can be casted to an EventRef."
so the header is
Cits last edited by
This is the include needed: