[prev in list] [next in list] [prev in thread] [next in thread] 

List:       kde-panel-devel
Subject:    Re: How to check if tooltip is visible (digital clock)?
From:       "=?UTF-8?Q?Rafa=C5=82_Mi=C5=82ecki?=" <zajec5 () gmail ! com>
Date:       2008-03-30 20:34:10
Message-ID: b170af450803301334q427b4248gc1b21926019602dc () mail ! gmail ! com
[Download RAW message or body]

2008/3/30, Aaron J. Seigo <aseigo@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
_______________________________________________
Panel-devel mailing list
Panel-devel@kde.org
https://mail.kde.org/mailman/listinfo/panel-devel

[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic