Basically, I would like to realize something like:

When click on menu item of "QMainWindow", a modal "Dialog" will jump out
and the user must pick up something then click "OK", or click "CANCEL" directly.

The thing is:
I would like this modal "Dialog" return a value to "QMainWindow",
how can I realize it?

Cheers