After building qt5, not able to find qmacdefines_mac.h in built lib/QtGui.framework
-
I am upgrading some qt projects from qt version 4 to version 5 on mac(mavericks). For that, i built qt5 from source and modified projects to use the qt5 lib which i built.
In my code, i am using qwidget method in my derived class:
virtual bool macEvent(EventHandlerCallRef caller, EventRef event)
But i get "Unknown type name EventHandlerCallRef" and "Unknown type name EventRef". After searching for this in qt 4, i found it inside "qmacdefines_mac.h" in lib/QtGui.framework/... but i could not find same file in qt 5 lib/QtGui.framework.
Did i miss any flag while building qt 5?
-
Hi and welcome to devnet,
No you didn't. However, the internal architecture changed a lot in between. You might be interested by the nativeEvent method.
Hope it helps
-
Thanks for your reply SGaist.
In old implementation(qt4), i was using EventRef to get NSEvent using as below code :
mywidget::macEvent(EventHandlerCallRef caller, EventRef event)
{NSEvent e = [NSEvent eventWithEventRef: event];
//using nsevent below
.....
}
In latest macEvent got deprecated and now have a new api nativeevent,mywidget::nativeEvent(const QByteArray& eventType, void* message,
long* result)
{}
How can we convert void *message to NSEvent on mac? -
AFAIK, you can simply cast message to NSEvent