PDA

View Full Version : Mac Plugin Event Loop Problems



grant
17th June 2009, 11:43
I am writing a plugin for an existing application and am having trouble with events . The plugin uses a QT dynamic library. The application is a very old Macapp Mac Application that does not really support carbon events. I am finding that after I create my QApplication and bring up my QMainWindow in my plugin even after I close my QMainWindow I still find that QApplication is eating all my events and my Macapp Application is getting no events what so ever. To solve this I have overridden QApplication::macEventFilter and called CallNextEventHandler. This changes means that I can know quit my main Macapp Application but I am finding that although shortcuts working for my menus if I go and try and select a menu item nothing happens. I have a Carbon Event Handler in my Macapp Application and it falls into the code but I am still finding button clicks , choosing a menu item , or choosing a popup is not working. I really need so help here. Do I need to call WaitNextEvent in my Carbon Event Handler in my Macapp Application, or repost the event?? Am I doing the right thing??
I have heard a lot about merging event loops and stuff but what I would like is to not have to create a QApplication and prevent Qt from handling my events and let my Application handle events and sending events to my QT library where I could call process events but I cannot seem to get any of this to really work. What is the correct methodology to use to get this to work??? Any Help would be appreciated and really needed as I am on a tight tight Deadline with my back up against the wall..

Thanks
Grant

spsingh
11th January 2013, 10:33
I have exactly the same problem have you been able to resolve this?