I have the following problem I am trying to solve:

My main window contains an image. In a child dialog that is opened from the main window the user needs to be able to go to the main window and select an area from the image then return control to the child dialog. This is optional and should only happen if the user clicks a button on the child dialog.

I have setup a signal in the child dialog and a slot in the main window to handle the interaction. But I can't get the main window to come to the front. I have tried using raise() in the main window and also stackUnder(parentWidget (FALSE)) (parentWidget (FALSE) always returns 0 so it is not working) in the child dialog to bring the main window forward. The main window clearly ends up with the focus when the button in the child dialog is clicked but only because I pop up a QMessageBox in the slot that handles the signal emitted by the child dialog but the main window is stuck behind the child dialog. The child dialog is modeless.

I am using QT3 if that matters.