I'm currently slamming my head against the table trying to get a QObject.connect
to work with KWindowSystem, with PyKDE, my code is as follows:
from PyKDE4.kdecore import *
from PyKDE4.kdeui import *
from PyQt4.QtCore import *
#Omitted Stupid KApplication parts.
def winCheck(WId):
print WId
kWinSys = KWindowSystem.self()
QObject.connect(kWinSys, SIGNAL("activeWindowChanged(WId)"), target_slot)