The pattern for a modal dialog is usually this

1. create dialog instance
2. call exec() on that instance
3. read values using getter methods

Cheers,
_