KTextBrowser Class Reference
from PyKDE4.kdeui import *
Inherits: QTextBrowser → QTextEdit → QAbstractScrollArea → QFrame → QWidget → QObject
Detailed Description
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.

"KDE Text Browser"
Signals | |
| mailClick (QString name, QString address) | |
| urlClick (QString url) | |
Methods | |
| __init__ (self, QWidget parent=0, bool notifyClick=0) | |
| contextMenuEvent (self, QContextMenuEvent event) | |
| bool | isNotifyClick (self) |
| keyPressEvent (self, QKeyEvent event) | |
| mailClick (self, QString name, QString address) | |
| setNotifyClick (self, bool notifyClick) | |
| setSource (self, QUrl name) | |
| urlClick (self, QString url) | |
| wheelEvent (self, QWheelEvent event) | |
Method Documentation
| __init__ | ( | self, | ||
| QWidget | parent=0, | |||
| bool | notifyClick=0 | |||
| ) |
Creates a new text browser.
- Parameters:
-
parent Parent of the widget. notifyClick true causes signals to be emitted.
| contextMenuEvent | ( | self, | ||
| QContextMenuEvent | event | |||
| ) |
Re-implemented for internal reasons. API not affected.
See QLineEdit.createPopupMenu().
| bool isNotifyClick | ( | self ) |
Returns whether a click on a link should be handled internally or if a signal should be emitted.
| keyPressEvent | ( | self, | ||
| QKeyEvent | event | |||
| ) |
Makes sure Key_Escape is ignored
Emitted when a mail link has been activated and the widget has been configured to emit the signal.
- Parameters:
-
name The destination name. It is QString() at the moment. address The destination address.
- Signal syntax:
QObject.connect(source, SIGNAL("mailClick(const QString&, const QString&)"), target_slot)
| setNotifyClick | ( | self, | ||
| bool | notifyClick | |||
| ) |
Decide whether a click on a link should be handled internally or if a signal should be emitted.
- Parameters:
-
notifyClick true causes signals to be emitted.
| setSource | ( | self, | ||
| QUrl | name | |||
| ) |
Reimplemented to NOT set the source but to do the special handling. Do not call.
| urlClick | ( | self, | ||
| QString | url | |||
| ) |
Emitted if mailClick() is not emitted and the widget has been configured to emit the signal.
- Parameters:
-
url The destination address.
- Signal syntax:
QObject.connect(source, SIGNAL("urlClick(const QString&)"), target_slot)
| wheelEvent | ( | self, | ||
| QWheelEvent | event | |||
| ) |
Reimplemented to support Qt2 behavior (Ctrl-Wheel = fast scroll)
KDE 4.2 PyKDE API Reference