HELP: how do I show a declaration tooltip

David Nolden david.nolden.kdevelop at art-master.de
Mon Aug 31 11:12:43 UTC 2009


Am Donnerstag 27 August 2009 18:41:47 schrieb Milian Wolff:
> What is the preferred way to show a declaration tooltip?
>
> I put my hopes on DUChain::self()->emitDeclarationSelected() but the
> contextbrowser requires views and does a lot stuff internally...
>
> Essentially I just want to create a tooltip a bit below the cursor
> position. Actually I want to fix
> https://bugs.kde.org/show_bug.cgi?id=189966 , i.e. show the tooltip when
> a user hovers an entry which resembles a declaration in the classbrowser.
>
> You find my current approach attached, but sadly it doesn't show
> anything :( The signals and such stuff is properly delegated so I think
> something in the contextbrowser is messing up... Isn't there a simpler
> way to show the tooltip?

emitDeclarationSelected does not trigger the tooltip to be shown, it just 
causes the declaration to be use-highlighted, shown in the context-browser, 
and hopefully also in the code-flow view soon.

Showing a tooltip is slightly more complicated right now, see 
ContextBrowserPlugin::showToolTip for example. We should move some of that 
code into a central location, as it already is replicated in a few other 
places.

Greetings, David





More information about the KDevelop-devel mailing list