I took a second look at the documentation. Maybe 'activateWindow()' is a better option than 'raise()' (?).
I am not clear on what you mean by your comment ("...other application windows on top as well..."). The idea is to move the window of interest to the top of the Z order so all other windows must fall behind it. I can't picture this bringing other application windows to the top along with the one you want to have active. I probably don't understand what you are describing.
If the other window that moves to the top is the one that that creates the signal for the target window (the one you want to have focus) then how are they connected together? When I tried my test I was using a named pipe so the programs were very separate and it worked well.