How to determine whether a plasmoid has keyboard focus?

Kun Zhang arthur.kun at gmail.com
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.

Thanks.

-- 
Best wishes
ZHANG Kun
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://mail.kde.org/pipermail/plasma-devel/attachments/20110219/747937ec/attachment.htm 


More information about the Plasma-devel mailing list