Well, it depends what you mean with "should work".I have just to re-implement for every QWidget the mousePressEvent(...) and it should work?
mousePressEvent() and the other event handlers will be called by Qt when a the relevant event happens (i.e pressing the mouse on the widget).
In that event handler you can do anything you want that should happen in that event.
So yes, that is as simple as that, didn't I say so?
The question which is hard for me to answer is, how will it effect your code?.
It seems to me, that your code is implementing an event loop and handler (don't forget that Qt's eent handling is working in parallel, which might be part of the problem) so if you go the Qt way, you will have to do adjustments - what is the extent of those adjustments, is hard for me to say.
Is addEventCallback() static or not?






Reply With Quote
Bookmarks