You can make use of signals and slots.
Just inform one another about the events you are interested in and decide upon the action