I've got a dialog for entering a bluetooth PIN for pairing. When I make a network connection to an unpaired phone, the dialog comes up and looks like it's got keyboard focus, but it's actually behind the network progress dialog. So when the user starts trying to type '1234' it doesn't get entered. They have to click on the dialog itself and then type.

I've tried various Qt calls to raise and bring my dialog to the front, tried setting the style to modal and always on top. Using a command line qcop message didn't bring it forward either. I've tried posting keyboard and mouse events to imitate a click on the dialog. No luck so far.

Anyone been here before? Any more suggestions for how to bring a dialog right to the top?