How to check if tooltip is visible (digital clock)?

Aaron J. Seigo aseigo at kde.org
Sun Mar 30 21:57:02 CEST 2008


On Sunday 30 March 2008, Rafał Miłecki wrote:
> 1) I can intercept event(..) and detect QEvent::ToolTip
> (isToolTipDisplayed=true) and QEvent::HoverLeave
> (isToolTipDisplayed=false).

this is likely to break. e.g. we hide the tooltip on mouse click as well.

> 2) I can use already prepared updateToolTip()
> (isToolTipDisplayed=true) which allows me not filtering events in
> event(). But I can't get know that tooltip disappeared so I don't know
> when to change isToolTipDisplayed to false.
>
> Is the first solution good enought to use for such a important part of
> KDE as digital clock (nearly everyone use it!)? Should we implement
> sth similar to updateToolTip(), let's say: toolTipRemoved()? Or maybe
> someone has better idea?

how about change updateToolTip() to upateToolTip(bool update). yes, it's a 
bit "ugly" but prevent bloating the applet API even further. it would be 
called with updateToolTip(true) when it's shown, etc and updateToolTip(false) 
when it is hidden.

-- 
Aaron J. Seigo
humru othro a kohnu se
GPG Fingerprint: 8B8B 2209 0C6F 7C47 B1EA  EE75 D6B7 2EB1 A7F1 DB43

KDE core developer sponsored by Trolltech
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 194 bytes
Desc: This is a digitally signed message part.
Url : http://mail.kde.org/pipermail/panel-devel/attachments/20080330/3578c7a6/attachment.pgp 


More information about the Panel-devel mailing list