Tooltips for KAction (was Re: GUI consistency - Go Menu)

Simon Hausmann hausmann at
Sun Aug 25 21:11:33 BST 2002

On Sun, Aug 25, 2002 at 08:40:00PM +0200, Ingo Klöcker wrote:
> > > Many actions have a text, an icon and a tooltip, e.g. all toolbar
> > > actions have an icon and should also have a tooltip.
> >
> > But I have seen, that what is passed as "tooltip" in the KGuiItem
> > is NOT what is shown as a tooltip in the Toolbar. Instead the Actions
> > name is shown.
> Indeed.
> > Why that? Is it a bug?
> I wouldn't call it a bug, but a wrong implementation. If an action has a 
> tooltip then IMO the action's tooltip should be shown as tooltip when 
> the mouse hovers over the toolbar icon of this action. Only if an 
> action doesn't have a tooltip the action's name should be shown as 
> tooltip.
> Could some of the core developers please comment on this?

I think there are two bugs.

The one bug is that KToolBarButton overrides any previously set
tooltip (by KAction for example) , see modeChange() . I think the
correct fix for that is to make use of QToolBar::textFor to properly
keep the tooltip previously set, in modeChange.

The other one is that KStdAction does not make use of
KGuiItem/KStdGuiItem, hence it does not provide actions with a
tooltip set. I think that one is obvious. Any thoughts/objections
about/against changing that?


More information about the kde-core-devel mailing list