How to determine whether a plasmoid has keyboard focus?

Kun Zhang arthur.kun at
Sat Feb 19 04:35:18 CET 2011

I'm writing a plasmoid in Python with a WebView. The WebView will reload the
page automatically by a QTimer. But I don't want it to reload itself when
I'm viewing or typing in the plasmoid, because it will be very annoying. So
I have to know whether the plasmoid has keyboard focus.

I tried hasFocus() of both Applet and WebView, but they always return False.
I also tried to override focusInEvent(), but it's never triggered.

I'm using KDE 4.5.5.


Best wishes
-------------- next part --------------
An HTML attachment was scrubbed...

More information about the Plasma-devel mailing list