A simple example showing how to use threads on Qt