Adding Quick-help

O Manual de Programação do KDevelop: O Guia do Utilizador para Desenvolvimento de Aplicações C++ para o Ambiente de Trabalho K (KDE) com o ambiente de trabalho KDevelop, Versão 2.1
Prev | Capítulo 8. Help Functions | Next

# 8.2. Adding Quick-help

Quick-Help windows are another good example of providing help. The user can access the quick-help over a widget that it is connected to by pressing the right mousebutton and selecting "Quick-Help" in the context menu. Therefore, Quick-Help can be placed somewhere in between a detailed handbook reference help and tool-tips- the documentation would be too extensive and a tool-tip would not provide enough information. To see how Quick-Help works, open any dialog within KDevelop and press the right mouse button over a dialog item. Then select the Quick-Help menuentry and you're offered the help message. Additionally, those messages can be formatted by color, font and even can be used for containing URL's to refer a certain webpage (and therefore can refer to the documentation handbook as well).

To make use of Quick-Help, add the include file `kquickhelp.h` to your sourcefile containing quick-help. As the `KQuickHelp` class is part of the KDE-UI library, it should already be used by your application; if not, set the linker flags of your project to use kdeui.

An example would be:

     KQuickHelp::add( yourwidget, i18n("your Tip") );

which is almost the same as with QToolTip. When constructing a dialog with the KDevelop dialogeditor, add your tool-tips and Quickhelp in the implementation file- NOT within the data sourcefile as this is rebuild by the dialogeditor every time you edit the widget.

The `KQuickHelp` class provides also formatting text by using tags. It allows hyperlinks including Internet protocols, colors, font types and sizes. See the KDE Library Reference Guide and the class documentation for `KQuickTip` for more information.

Prev | Home | Next
Help Functions | Up | Extending the Statusbar Help