How to check if tooltip is visible (digital clock)?
Rafał Miłecki
zajec5 at gmail.com
Sun Mar 30 22:34:10 CEST 2008
2008/3/30, Aaron J. Seigo <aseigo at kde.org>:
> 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.
>
>
Ah, didn't think about. Indeed it's bad idea then.
> > 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.
>
>
I'm surely not experienced enoght to decide which solution is better
(new method, or boolean argument to already existing updateToolTip) so
it's up to you and more experienced (than me) guys :) Of course both
solutions let me solve my problem so any of theses would be welcome.
--
Rafał Miłecki
More information about the Panel-devel
mailing list