QwwRichTextButton Class
The QwwRichTextButton class provides a button that can display rich text content. More...
Header: | #include <QwwRichTextButton> |
Properties
- html : QString
Public Functions
QwwRichTextButton(QWidget * parent = 0) | |
QwwRichTextButton(QTextDocument * doc, QWidget * parent = 0) | |
QTextDocument * | document() const |
QString | html() const |
void | setDocument(QTextDocument * doc) |
Public Slots
void | setHtml(const QString & txt) |
Detailed Description
The QwwRichTextButton class provides a button that can display rich text content.
This widget is similar in its behavior to QPushButton, but it can display not only plain text, but also rich text. The text to be displayed can be set either using the html property or by assigning a QTextDocument to the widget using setDocument().
Property Documentation
html : QString
This property holds the text displayed on the button.
Access functions:
QString | html() const |
void | setHtml(const QString & txt) |
Member Function Documentation
QwwRichTextButton::QwwRichTextButton(QWidget * parent = 0)
Constructs a rich text button with a given parent.
QwwRichTextButton::QwwRichTextButton(QTextDocument * doc, QWidget * parent = 0)
Constructs a rich text button with a given parent and doc set as the document
QTextDocument * QwwRichTextButton::document() const
Returns the current document for the button.
See also setDocument().
void QwwRichTextButton::setDocument(QTextDocument * doc)
Makes doc the new document for the button.
The content of the document is displayed on the button. Widget does not take ownership of the document.
See also document().