tags:

views:

636

answers:

3

I would like to force my python app to the front if a condition occurs. I'm using Kubuntu & QT3.1

I've tried setActiveWindow(), but it only flashes the task bar in KDE.

I think Windows has a function bringwindowtofront() for VB.

Is there something similar for KDE?

+1  A: 

Have you tried using those 3 (in this order) on your window instead of only setActiveWindow?

show()
raise() # this might be raiseW() in Python
setActiveWindow()
lpfavreau
+4  A: 

Check if KWin is configured to prevent focus stealing.

There might be nothing wrong with your code -- but we linux people don't like applications bugging us when we work, so stealing focus is kinda frowned upon, and difficult under some window managers.

gnud
Not just Linux guys don't like windows stealing focus!
furtelwart
=) but can you do anything about it on non-X11 systems?
gnud
BTW, I'm making this action optional + its just a personal project so the HIG won't apply.
+1  A: