Calling a function is easy, since you either call the function directly or make it a slot and let form2 emit a signal.

If you need to send an event, see QCoreApplication::postEvent().

Cheers,
_