How can I get an initialization function to run once "return( app.exec )" is run?

Thanks