That looks correct.

Does your main() exit when QApplication::exec() returns?

Cheers,
_