# class KTextBrowser

###

Module | kdeui
Namespace |
Class | KTextBrowser
Inherits | QTextBrowser

Extended QTextBrowser.

An extended QTextBrowser.

By default it will invoke the system mailer or the system browser when a link is activated, or it can emit the signal urlClick() or mailClick() when a link is activated.

If the link starts with the text "whatsthis:" a QWhatsThis box will appear and then display the rest of the text.

Author Espen Sand (espensa@online.no)

### methods

- KTextBrowser (parent, notifyClick)

  returns ctor
  KDE 4.1.0 and later only

  Argument | Type | Default
  --- | --- | ---
  parent | QWidget | 0
  notifyClick | bool | 0

  Creates a new text browser.

  parent - Parent of the widget.

  notifyClick - true causes signals to be emitted.

- KTextBrowser (a0, a1)

  returns ctor
  before KDE 4.1.0 only

  Argument | Type | Default
  --- | --- | ---
  a0 | QWidget | 0
  a1 | bool | 0

- contextMenuEvent (event)

  returns Nothing

  Argument | Type | Default
  --- | --- | ---
  event | QContextMenuEvent |

  Re-implemented for internal reasons. API not affected.

  See QLineEdit.createPopupMenu().

- isNotifyClick ( )

  returns bool

  Returns whether a click on a link should be handled internally or if a signal should be emitted.

- keyPressEvent (event)

  returns Nothing

  Argument | Type | Default
  --- | --- | ---
  event | QKeyEvent |

  Makes sure Key_Escape is ignored

- mailClick (name, address)

  returns Nothing
  SIGNAL ("mailClick (const QString&, const QString&)")

  Argument | Type | Default
  --- | --- | ---
  name | QString |
  address | QString |

  Emitted when a mail link has been activated and the widget has been configured to emit the signal.

  name - The destination name. It is QString() at the moment.

  address - The destination address.

- setNotifyClick (notifyClick)

  returns Nothing

  Argument | Type | Default
  --- | --- | ---
  notifyClick | bool |

  Decide whether a click on a link should be handled internally or if a signal should be emitted.

  notifyClick - true causes signals to be emitted.

- setSource (name)

  returns Nothing

  Argument | Type | Default
  --- | --- | ---
  name | QUrl |

  Reimplemented to NOT set the source but to do the special handling. Do not call.

- urlClick (url)

  returns Nothing
  SIGNAL ("urlClick (const QString&)")

  Argument | Type | Default
  --- | --- | ---
  url | QString |

  Emitted if mailClick() is not emitted and the widget has been configured to emit the signal.

  url - The destination address.

- wheelEvent (event)

  returns Nothing

  Argument | Type | Default
  --- | --- | ---
  event | QWheelEvent |

  Reimplemented to support Qt2 behavior (Ctrl-Wheel = fast scroll)