[][src]Struct qt_widgets::QTextBrowser

#[repr(C)]
pub struct QTextBrowser { /* fields omitted */ }

The QTextBrowser class provides a rich text browser with hypertext navigation.

C++ class: QTextBrowser.

C++ documentation:

The QTextBrowser class provides a rich text browser with hypertext navigation.

This class extends QTextEdit (in read-only mode), adding some navigation functionality so that users can follow links in hypertext documents.

If you want to provide your users with an editable rich text editor, use QTextEdit. If you want a text browser without hypertext navigation use QTextEdit, and use QTextEdit::setReadOnly() to disable editing. If you just need to display a small piece of rich text use QLabel.

Methods

impl QTextBrowser[src]

pub fn slot_set_source(&self) -> Receiver<(*const QUrl,)>[src]

This property holds the name of the displayed document.

Returns a built-in Qt slot QTextBrowser::setSource that can be passed to qt_core::Signal::connect.

C++ documentation:

This property holds the name of the displayed document.

This is a an invalid url if no document is displayed or if the source is unknown.

When setting this property QTextBrowser tries to find a document with the specified name in the paths of the searchPaths property and directory of the current source, unless the value is an absolute file path. It also checks for optional anchors and scrolls the document accordingly

If the first tag in the document is <qt type=detail>, the document is displayed as a popup rather than as new document in the browser window itself. Otherwise, the document is displayed normally in the text browser with the text set to the contents of the named document with setHtml().

By default, this property contains an empty URL.

Access functions:

QUrl source() const
virtual void setSource(const QUrl &name)

pub fn slot_backward(&self) -> Receiver<()>[src]

Changes the document displayed to the previous document in the list of documents built by navigating links. Does nothing if there is no previous document.

Returns a built-in Qt slot QTextBrowser::backward that can be passed to qt_core::Signal::connect.

C++ documentation:

Changes the document displayed to the previous document in the list of documents built by navigating links. Does nothing if there is no previous document.

See also forward() and backwardAvailable().

pub fn slot_forward(&self) -> Receiver<()>[src]

Changes the document displayed to the next document in the list of documents built by navigating links. Does nothing if there is no next document.

Returns a built-in Qt slot QTextBrowser::forward that can be passed to qt_core::Signal::connect.

C++ documentation:

Changes the document displayed to the next document in the list of documents built by navigating links. Does nothing if there is no next document.

See also backward() and forwardAvailable().

pub fn slot_home(&self) -> Receiver<()>[src]

Changes the document displayed to be the first document from the history.

Returns a built-in Qt slot QTextBrowser::home that can be passed to qt_core::Signal::connect.

C++ documentation:

Changes the document displayed to be the first document from the history.

pub fn slot_reload(&self) -> Receiver<()>[src]

Reloads the current set source.

Returns a built-in Qt slot QTextBrowser::reload that can be passed to qt_core::Signal::connect.

C++ documentation:

Reloads the current set source.

pub fn backward_available(&self) -> Signal<(bool,)>[src]

This signal is emitted when the availability of backward() changes. available is false when the user is at home(); otherwise it is true.

Returns a built-in Qt signal QTextBrowser::backwardAvailable that can be passed to qt_core::Signal::connect.

C++ documentation:

This signal is emitted when the availability of backward() changes. available is false when the user is at home(); otherwise it is true.

pub fn forward_available(&self) -> Signal<(bool,)>[src]

This signal is emitted when the availability of forward() changes. available is true after the user navigates backward() and false when the user navigates or goes forward().

Returns a built-in Qt signal QTextBrowser::forwardAvailable that can be passed to qt_core::Signal::connect.

C++ documentation:

This signal is emitted when the availability of forward() changes. available is true after the user navigates backward() and false when the user navigates or goes forward().

pub fn history_changed(&self) -> Signal<()>[src]

This signal is emitted when the history changes.

Returns a built-in Qt signal QTextBrowser::historyChanged that can be passed to qt_core::Signal::connect.

C++ documentation:

This signal is emitted when the history changes.

This function was introduced in Qt 4.4.

See also historyTitle() and historyUrl().

pub fn source_changed(&self) -> Signal<(*const QUrl,)>[src]

This signal is emitted when the source has changed, src being the new source.

Returns a built-in Qt signal QTextBrowser::sourceChanged that can be passed to qt_core::Signal::connect.

C++ documentation:

This signal is emitted when the source has changed, src being the new source.

Source changes happen both programmatically when calling setSource(), forward(), backword() or home() or when the user clicks on links or presses the equivalent key sequences.

pub fn highlighted(&self) -> Signal<(*const QUrl,)>[src]

This signal is emitted when the user has selected but not activated an anchor in the document. The URL referred to by the anchor is passed in link.

Returns a built-in Qt signal QTextBrowser::highlighted that can be passed to qt_core::Signal::connect.

C++ documentation:

This signal is emitted when the user has selected but not activated an anchor in the document. The URL referred to by the anchor is passed in link.

Note: Signal highlighted is overloaded in this class. To connect to this one using the function pointer syntax, you must specify the signal type in a static cast, as shown in this example:

connect(textBrowser, static_cast<void(QTextBrowser::)(const QUrl &)>(&QTextBrowser::highlighted), [=](const QUrl &link){ / ... */ });

pub fn highlighted2(&self) -> Signal<(*const QString,)>[src]

This is an overloaded function.

Returns a built-in Qt signal QTextBrowser::highlighted that can be passed to qt_core::Signal::connect.

C++ documentation:

This is an overloaded function.

Convenience signal that allows connecting to a slot that takes just a QString, like for example QStatusBar's message().

Note: Signal highlighted is overloaded in this class. To connect to this one using the function pointer syntax, you must specify the signal type in a static cast, as shown in this example:

connect(textBrowser, static_cast<void(QTextBrowser::)(const QString &)>(&QTextBrowser::highlighted), [=](const QString &link){ / ... */ });

pub fn anchor_clicked(&self) -> Signal<(*const QUrl,)>[src]

This signal is emitted when the user clicks an anchor. The URL referred to by the anchor is passed in link.

Returns a built-in Qt signal QTextBrowser::anchorClicked that can be passed to qt_core::Signal::connect.

C++ documentation:

This signal is emitted when the user clicks an anchor. The URL referred to by the anchor is passed in link.

Note that the browser will automatically handle navigation to the location specified by link unless the openLinks property is set to false or you call setSource() in a slot connected. This mechanism is used to override the default navigation features of the browser.

pub unsafe fn backward(&mut self)[src]

Changes the document displayed to the previous document in the list of documents built by navigating links. Does nothing if there is no previous document.

Calls C++ function: virtual [slot] void QTextBrowser::backward().

C++ documentation:

Changes the document displayed to the previous document in the list of documents built by navigating links. Does nothing if there is no previous document.

See also forward() and backwardAvailable().

pub unsafe fn backward_history_count(&self) -> c_int[src]

Returns the number of locations backward in the history.

Calls C++ function: int QTextBrowser::backwardHistoryCount() const.

C++ documentation:

Returns the number of locations backward in the history.

This function was introduced in Qt 4.4.

pub unsafe fn clear_history(&mut self)[src]

Clears the history of visited documents and disables the forward and backward navigation.

Calls C++ function: void QTextBrowser::clearHistory().

C++ documentation:

Clears the history of visited documents and disables the forward and backward navigation.

This function was introduced in Qt 4.2.

See also backward() and forward().

pub unsafe fn forward(&mut self)[src]

Changes the document displayed to the next document in the list of documents built by navigating links. Does nothing if there is no next document.

Calls C++ function: virtual [slot] void QTextBrowser::forward().

C++ documentation:

Changes the document displayed to the next document in the list of documents built by navigating links. Does nothing if there is no next document.

See also backward() and forwardAvailable().

pub unsafe fn forward_history_count(&self) -> c_int[src]

Returns the number of locations forward in the history.

Calls C++ function: int QTextBrowser::forwardHistoryCount() const.

C++ documentation:

Returns the number of locations forward in the history.

This function was introduced in Qt 4.4.

pub unsafe fn history_title(&self, arg1: c_int) -> CppBox<QString>[src]

Returns the documentTitle() of the HistoryItem.

Calls C++ function: QString QTextBrowser::historyTitle(int arg1) const.

C++ documentation:

Returns the documentTitle() of the HistoryItem.

InputReturn
i < 0backward() history
i == 0current, see QTextBrowser::source()
i > 0forward() history

backaction.setToolTip(browser.historyTitle(-1)); forwardaction.setToolTip(browser.historyTitle(+1));

This function was introduced in Qt 4.4.

pub unsafe fn history_url(&self, arg1: c_int) -> CppBox<QUrl>[src]

Returns the url of the HistoryItem.

Calls C++ function: QUrl QTextBrowser::historyUrl(int arg1) const.

C++ documentation:

Returns the url of the HistoryItem.

InputReturn
i < 0backward() history
i == 0current, see QTextBrowser::source()
i > 0forward() history

This function was introduced in Qt 4.4.

pub unsafe fn home(&mut self)[src]

Changes the document displayed to be the first document from the history.

Calls C++ function: virtual [slot] void QTextBrowser::home().

C++ documentation:

Changes the document displayed to be the first document from the history.

pub unsafe fn is_backward_available(&self) -> bool[src]

Returns true if the text browser can go backward in the document history using backward().

Calls C++ function: bool QTextBrowser::isBackwardAvailable() const.

C++ documentation:

Returns true if the text browser can go backward in the document history using backward().

This function was introduced in Qt 4.2.

See also backwardAvailable() and backward().

pub unsafe fn is_forward_available(&self) -> bool[src]

Returns true if the text browser can go forward in the document history using forward().

Calls C++ function: bool QTextBrowser::isForwardAvailable() const.

C++ documentation:

Returns true if the text browser can go forward in the document history using forward().

This function was introduced in Qt 4.2.

See also forwardAvailable() and forward().

pub unsafe fn load_resource(
    &mut self,
    type_: c_int,
    name: impl CastInto<Ref<QUrl>>
) -> CppBox<QVariant>
[src]

Reimplemented from QTextEdit::loadResource().

Calls C++ function: virtual QVariant QTextBrowser::loadResource(int type, const QUrl& name).

C++ documentation:

Reimplemented from QTextEdit::loadResource().

This function is called when the document is loaded and for each image in the document. The type indicates the type of resource to be loaded. An invalid QVariant is returned if the resource cannot be loaded.

The default implementation ignores type and tries to locate the resources by interpreting name as a file name. If it is not an absolute path it tries to find the file in the paths of the searchPaths property and in the same directory as the current source. On success, the result is a QVariant that stores a QByteArray with the contents of the file.

If you reimplement this function, you can return other QVariant types. The table below shows which variant types are supported depending on the resource type:

pub unsafe fn meta_object(&self) -> Ptr<QMetaObject>[src]

Calls C++ function: virtual const QMetaObject* QTextBrowser::metaObject() const.

pub unsafe fn new_1a(
    parent: impl CastInto<MutPtr<QWidget>>
) -> CppBox<QTextBrowser>
[src]

Constructs an empty QTextBrowser with parent parent.

Calls C++ function: [constructor] void QTextBrowser::QTextBrowser(QWidget* parent = …).

C++ documentation:

Constructs an empty QTextBrowser with parent parent.

pub unsafe fn new_0a() -> CppBox<QTextBrowser>[src]

The QTextBrowser class provides a rich text browser with hypertext navigation.

Calls C++ function: [constructor] void QTextBrowser::QTextBrowser().

C++ documentation:

The QTextBrowser class provides a rich text browser with hypertext navigation.

This class extends QTextEdit (in read-only mode), adding some navigation functionality so that users can follow links in hypertext documents.

If you want to provide your users with an editable rich text editor, use QTextEdit. If you want a text browser without hypertext navigation use QTextEdit, and use QTextEdit::setReadOnly() to disable editing. If you just need to display a small piece of rich text use QLabel.

Specifies whether QTextBrowser should automatically open links to external sources using QDesktopServices::openUrl() instead of emitting the anchorClicked signal. Links are considered external if their scheme is neither file or qrc.

Calls C++ function: bool QTextBrowser::openExternalLinks() const.

C++ documentation:

Specifies whether QTextBrowser should automatically open links to external sources using QDesktopServices::openUrl() instead of emitting the anchorClicked signal. Links are considered external if their scheme is neither file or qrc.

The default value is false.

This property was introduced in Qt 4.2.

Access functions:

bool openExternalLinks() const
void setOpenExternalLinks(bool open)

This property specifies whether QTextBrowser should automatically open links the user tries to activate by mouse or keyboard.

Calls C++ function: bool QTextBrowser::openLinks() const.

C++ documentation:

This property specifies whether QTextBrowser should automatically open links the user tries to activate by mouse or keyboard.

Regardless of the value of this property the anchorClicked signal is always emitted.

The default value is true.

This property was introduced in Qt 4.3.

Access functions:

bool openLinks() const
void setOpenLinks(bool open)

pub unsafe fn qt_metacall(
    &mut self,
    arg1: Call,
    arg2: c_int,
    arg3: impl CastInto<MutPtr<*mut c_void>>
) -> c_int
[src]

Calls C++ function: virtual int QTextBrowser::qt_metacall(QMetaObject::Call arg1, int arg2, void** arg3).

pub unsafe fn qt_metacast(
    &mut self,
    arg1: impl CastInto<Ptr<c_char>>
) -> MutPtr<c_void>
[src]

Calls C++ function: virtual void* QTextBrowser::qt_metacast(const char* arg1).

pub unsafe fn reload(&mut self)[src]

Reloads the current set source.

Calls C++ function: virtual [slot] void QTextBrowser::reload().

C++ documentation:

Reloads the current set source.

pub unsafe fn search_paths(&self) -> CppBox<QStringList>[src]

This property holds the search paths used by the text browser to find supporting content

Calls C++ function: QStringList QTextBrowser::searchPaths() const.

C++ documentation:

This property holds the search paths used by the text browser to find supporting content

QTextBrowser uses this list to locate images and documents.

By default, this property contains an empty string list.

Access functions:

QStringList searchPaths() const
void setSearchPaths(const QStringList &paths)

Specifies whether QTextBrowser should automatically open links to external sources using QDesktopServices::openUrl() instead of emitting the anchorClicked signal. Links are considered external if their scheme is neither file or qrc.

Calls C++ function: void QTextBrowser::setOpenExternalLinks(bool open).

C++ documentation:

Specifies whether QTextBrowser should automatically open links to external sources using QDesktopServices::openUrl() instead of emitting the anchorClicked signal. Links are considered external if their scheme is neither file or qrc.

The default value is false.

This property was introduced in Qt 4.2.

Access functions:

bool openExternalLinks() const
void setOpenExternalLinks(bool open)

This property specifies whether QTextBrowser should automatically open links the user tries to activate by mouse or keyboard.

Calls C++ function: void QTextBrowser::setOpenLinks(bool open).

C++ documentation:

This property specifies whether QTextBrowser should automatically open links the user tries to activate by mouse or keyboard.

Regardless of the value of this property the anchorClicked signal is always emitted.

The default value is true.

This property was introduced in Qt 4.3.

Access functions:

bool openLinks() const
void setOpenLinks(bool open)

pub unsafe fn set_search_paths(
    &mut self,
    paths: impl CastInto<Ref<QStringList>>
)
[src]

This property holds the search paths used by the text browser to find supporting content

Calls C++ function: void QTextBrowser::setSearchPaths(const QStringList& paths).

C++ documentation:

This property holds the search paths used by the text browser to find supporting content

QTextBrowser uses this list to locate images and documents.

By default, this property contains an empty string list.

Access functions:

QStringList searchPaths() const
void setSearchPaths(const QStringList &paths)

pub unsafe fn set_source(&mut self, name: impl CastInto<Ref<QUrl>>)[src]

This property holds the name of the displayed document.

Calls C++ function: virtual [slot] void QTextBrowser::setSource(const QUrl& name).

C++ documentation:

This property holds the name of the displayed document.

This is a an invalid url if no document is displayed or if the source is unknown.

When setting this property QTextBrowser tries to find a document with the specified name in the paths of the searchPaths property and directory of the current source, unless the value is an absolute file path. It also checks for optional anchors and scrolls the document accordingly

If the first tag in the document is <qt type=detail>, the document is displayed as a popup rather than as new document in the browser window itself. Otherwise, the document is displayed normally in the text browser with the text set to the contents of the named document with setHtml().

By default, this property contains an empty URL.

Access functions:

QUrl source() const
virtual void setSource(const QUrl &name)

pub unsafe fn source(&self) -> CppBox<QUrl>[src]

This property holds the name of the displayed document.

Calls C++ function: QUrl QTextBrowser::source() const.

C++ documentation:

This property holds the name of the displayed document.

This is a an invalid url if no document is displayed or if the source is unknown.

When setting this property QTextBrowser tries to find a document with the specified name in the paths of the searchPaths property and directory of the current source, unless the value is an absolute file path. It also checks for optional anchors and scrolls the document accordingly

If the first tag in the document is <qt type=detail>, the document is displayed as a popup rather than as new document in the browser window itself. Otherwise, the document is displayed normally in the text browser with the text set to the contents of the named document with setHtml().

By default, this property contains an empty URL.

Access functions:

QUrl source() const
virtual void setSource(const QUrl &name)

pub unsafe fn static_meta_object() -> Ref<QMetaObject>[src]

Returns a reference to the staticMetaObject field.

pub unsafe fn tr(
    s: impl CastInto<Ptr<c_char>>,
    c: impl CastInto<Ptr<c_char>>,
    n: c_int
) -> CppBox<QString>
[src]

Calls C++ function: static QString QTextBrowser::tr(const char* s, const char* c, int n).

pub unsafe fn tr_utf8(
    s: impl CastInto<Ptr<c_char>>,
    c: impl CastInto<Ptr<c_char>>,
    n: c_int
) -> CppBox<QString>
[src]

Calls C++ function: static QString QTextBrowser::trUtf8(const char* s, const char* c, int n).

Methods from Deref<Target = QTextEdit>

pub fn slot_set_font_point_size(&self) -> Receiver<(c_double,)>[src]

Sets the point size of the current format to s.

Returns a built-in Qt slot QTextEdit::setFontPointSize that can be passed to qt_core::Signal::connect.

C++ documentation:

Sets the point size of the current format to s.

Note that if s is zero or negative, the behavior of this function is not defined.

See also fontPointSize(), setCurrentFont(), and setFontFamily().

pub fn slot_set_font_family(&self) -> Receiver<(*const QString,)>[src]

Sets the font family of the current format to fontFamily.

Returns a built-in Qt slot QTextEdit::setFontFamily that can be passed to qt_core::Signal::connect.

C++ documentation:

Sets the font family of the current format to fontFamily.

See also fontFamily() and setCurrentFont().

pub fn slot_set_font_weight(&self) -> Receiver<(c_int,)>[src]

Sets the font weight of the current format to the given weight, where the value used is in the range defined by the QFont::Weight enum.

Returns a built-in Qt slot QTextEdit::setFontWeight that can be passed to qt_core::Signal::connect.

C++ documentation:

Sets the font weight of the current format to the given weight, where the value used is in the range defined by the QFont::Weight enum.

See also fontWeight(), setCurrentFont(), and setFontFamily().

pub fn slot_set_font_underline(&self) -> Receiver<(bool,)>[src]

If underline is true, sets the current format to underline; otherwise sets the current format to non-underline.

Returns a built-in Qt slot QTextEdit::setFontUnderline that can be passed to qt_core::Signal::connect.

C++ documentation:

If underline is true, sets the current format to underline; otherwise sets the current format to non-underline.

See also fontUnderline().

pub fn slot_set_font_italic(&self) -> Receiver<(bool,)>[src]

If italic is true, sets the current format to italic; otherwise sets the current format to non-italic.

Returns a built-in Qt slot QTextEdit::setFontItalic that can be passed to qt_core::Signal::connect.

C++ documentation:

If italic is true, sets the current format to italic; otherwise sets the current format to non-italic.

See also fontItalic().

pub fn slot_set_text_color(&self) -> Receiver<(*const QColor,)>[src]

Sets the text color of the current format to c.

Returns a built-in Qt slot QTextEdit::setTextColor that can be passed to qt_core::Signal::connect.

C++ documentation:

Sets the text color of the current format to c.

See also textColor().

pub fn slot_set_text_background_color(&self) -> Receiver<(*const QColor,)>[src]

Sets the text background color of the current format to c.

Returns a built-in Qt slot QTextEdit::setTextBackgroundColor that can be passed to qt_core::Signal::connect.

C++ documentation:

Sets the text background color of the current format to c.

This function was introduced in Qt 4.4.

See also textBackgroundColor().

pub fn slot_set_current_font(&self) -> Receiver<(*const QFont,)>[src]

Sets the font of the current format to f.

Returns a built-in Qt slot QTextEdit::setCurrentFont that can be passed to qt_core::Signal::connect.

C++ documentation:

Sets the font of the current format to f.

See also currentFont(), setFontPointSize(), and setFontFamily().

pub fn slot_set_alignment(&self) -> Receiver<(c_int,)>[src]

Sets the alignment of the current paragraph to a. Valid alignments are Qt::AlignLeft, Qt::AlignRight, Qt::AlignJustify and Qt::AlignCenter (which centers horizontally).

Returns a built-in Qt slot QTextEdit::setAlignment that can be passed to qt_core::Signal::connect.

C++ documentation:

Sets the alignment of the current paragraph to a. Valid alignments are Qt::AlignLeft, Qt::AlignRight, Qt::AlignJustify and Qt::AlignCenter (which centers horizontally).

See also alignment().

pub fn slot_set_plain_text(&self) -> Receiver<(*const QString,)>[src]

Changes the text of the text edit to the string text. Any previous text is removed.

Returns a built-in Qt slot QTextEdit::setPlainText that can be passed to qt_core::Signal::connect.

C++ documentation:

Changes the text of the text edit to the string text. Any previous text is removed.

text is interpreted as plain text.

Note that the undo/redo history is cleared by this function.

Note: Setter function for property plainText.

See also toPlainText().

pub fn slot_set_html(&self) -> Receiver<(*const QString,)>[src]

This property provides an HTML interface to the text of the text edit.

Returns a built-in Qt slot QTextEdit::setHtml that can be passed to qt_core::Signal::connect.

C++ documentation:

This property provides an HTML interface to the text of the text edit.

toHtml() returns the text of the text edit as html.

setHtml() changes the text of the text edit. Any previous text is removed and the undo/redo history is cleared. The input text is interpreted as rich text in html format.

Note: It is the responsibility of the caller to make sure that the text is correctly decoded when a QString containing HTML is created and passed to setHtml().

By default, for a newly-created, empty document, this property contains text to describe an HTML 4.0 document with no body text.

Access functions:

QString toHtml() const
void setHtml(const QString &text)

Notifier signal:

void textChanged()

See also Supported HTML Subset and plainText.

pub fn slot_set_text(&self) -> Receiver<(*const QString,)>[src]

Sets the text edit's text. The text can be plain text or HTML and the text edit will try to guess the right format.

Returns a built-in Qt slot QTextEdit::setText that can be passed to qt_core::Signal::connect.

C++ documentation:

Sets the text edit's text. The text can be plain text or HTML and the text edit will try to guess the right format.

Use setHtml() or setPlainText() directly to avoid text edit's guessing.

This function was introduced in Qt 4.2.

See also toPlainText() and toHtml().

pub fn slot_cut(&self) -> Receiver<()>[src]

Copies the selected text to the clipboard and deletes it from the text edit.

Returns a built-in Qt slot QTextEdit::cut that can be passed to qt_core::Signal::connect.

C++ documentation:

Copies the selected text to the clipboard and deletes it from the text edit.

If there is no selected text nothing happens.

See also copy() and paste().

pub fn slot_copy(&self) -> Receiver<()>[src]

Copies any selected text to the clipboard.

Returns a built-in Qt slot QTextEdit::copy that can be passed to qt_core::Signal::connect.

C++ documentation:

Copies any selected text to the clipboard.

See also copyAvailable().

pub fn slot_paste(&self) -> Receiver<()>[src]

Pastes the text from the clipboard into the text edit at the current cursor position.

Returns a built-in Qt slot QTextEdit::paste that can be passed to qt_core::Signal::connect.

C++ documentation:

Pastes the text from the clipboard into the text edit at the current cursor position.

If there is no text in the clipboard nothing happens.

To change the behavior of this function, i.e. to modify what QTextEdit can paste and how it is being pasted, reimplement the virtual canInsertFromMimeData() and insertFromMimeData() functions.

See also cut() and copy().

pub fn slot_undo(&self) -> Receiver<()>[src]

Undoes the last operation.

Returns a built-in Qt slot QTextEdit::undo that can be passed to qt_core::Signal::connect.

C++ documentation:

Undoes the last operation.

If there is no operation to undo, i.e. there is no undo step in the undo/redo history, nothing happens.

This function was introduced in Qt 4.2.

See also redo().

pub fn slot_redo(&self) -> Receiver<()>[src]

Redoes the last operation.

Returns a built-in Qt slot QTextEdit::redo that can be passed to qt_core::Signal::connect.

C++ documentation:

Redoes the last operation.

If there is no operation to redo, i.e. there is no redo step in the undo/redo history, nothing happens.

This function was introduced in Qt 4.2.

See also undo().

pub fn slot_clear(&self) -> Receiver<()>[src]

Deletes all the text in the text edit.

Returns a built-in Qt slot QTextEdit::clear that can be passed to qt_core::Signal::connect.

C++ documentation:

Deletes all the text in the text edit.

Note that the undo/redo history is cleared by this function.

See also cut(), setPlainText(), and setHtml().

pub fn slot_select_all(&self) -> Receiver<()>[src]

Selects all text.

Returns a built-in Qt slot QTextEdit::selectAll that can be passed to qt_core::Signal::connect.

C++ documentation:

Selects all text.

See also copy(), cut(), and textCursor().

pub fn slot_insert_plain_text(&self) -> Receiver<(*const QString,)>[src]

Convenience slot that inserts text at the current cursor position.

Returns a built-in Qt slot QTextEdit::insertPlainText that can be passed to qt_core::Signal::connect.

C++ documentation:

Convenience slot that inserts text at the current cursor position.

It is equivalent to

edit->textCursor().insertText(text);

pub fn slot_insert_html(&self) -> Receiver<(*const QString,)>[src]

Convenience slot that inserts text which is assumed to be of html formatting at the current cursor position.

Returns a built-in Qt slot QTextEdit::insertHtml that can be passed to qt_core::Signal::connect.

C++ documentation:

Convenience slot that inserts text which is assumed to be of html formatting at the current cursor position.

It is equivalent to:

edit->textCursor().insertHtml(fragment);

Note: When using this function with a style sheet, the style sheet will only apply to the current block in the document. In order to apply a style sheet throughout a document, use QTextDocument::setDefaultStyleSheet() instead.

pub fn slot_append(&self) -> Receiver<(*const QString,)>[src]

Appends a new paragraph with text to the end of the text edit.

Returns a built-in Qt slot QTextEdit::append that can be passed to qt_core::Signal::connect.

C++ documentation:

Appends a new paragraph with text to the end of the text edit.

Note: The new paragraph appended will have the same character format and block format as the current paragraph, determined by the position of the cursor.

See also currentCharFormat() and QTextCursor::blockFormat().

pub fn slot_scroll_to_anchor(&self) -> Receiver<(*const QString,)>[src]

Scrolls the text edit so that the anchor with the given name is visible; does nothing if the name is empty, or is already visible, or isn't found.

Returns a built-in Qt slot QTextEdit::scrollToAnchor that can be passed to qt_core::Signal::connect.

C++ documentation:

Scrolls the text edit so that the anchor with the given name is visible; does nothing if the name is empty, or is already visible, or isn't found.

pub fn slot_zoom_in(&self) -> Receiver<(c_int,)>[src]

Zooms in on the text by making the base font size range points larger and recalculating all font sizes to be the new size. This does not change the size of any images.

Returns a built-in Qt slot QTextEdit::zoomIn that can be passed to qt_core::Signal::connect.

C++ documentation:

Zooms in on the text by making the base font size range points larger and recalculating all font sizes to be the new size. This does not change the size of any images.

See also zoomOut().

pub fn slot_zoom_out(&self) -> Receiver<(c_int,)>[src]

Zooms out on the text by making the base font size range points smaller and recalculating all font sizes to be the new size. This does not change the size of any images.

Returns a built-in Qt slot QTextEdit::zoomOut that can be passed to qt_core::Signal::connect.

C++ documentation:

Zooms out on the text by making the base font size range points smaller and recalculating all font sizes to be the new size. This does not change the size of any images.

See also zoomIn().

pub fn text_changed(&self) -> Signal<()>[src]

This signal is emitted whenever the document's content changes; for example, when text is inserted or deleted, or when formatting is applied.

Returns a built-in Qt signal QTextEdit::textChanged that can be passed to qt_core::Signal::connect.

C++ documentation:

This signal is emitted whenever the document's content changes; for example, when text is inserted or deleted, or when formatting is applied.

Note: Notifier signal for property html.

pub fn undo_available(&self) -> Signal<(bool,)>[src]

This signal is emitted whenever undo operations become available (available is true) or unavailable (available is false).

Returns a built-in Qt signal QTextEdit::undoAvailable that can be passed to qt_core::Signal::connect.

C++ documentation:

This signal is emitted whenever undo operations become available (available is true) or unavailable (available is false).

pub fn redo_available(&self) -> Signal<(bool,)>[src]

This signal is emitted whenever redo operations become available (available is true) or unavailable (available is false).

Returns a built-in Qt signal QTextEdit::redoAvailable that can be passed to qt_core::Signal::connect.

C++ documentation:

This signal is emitted whenever redo operations become available (available is true) or unavailable (available is false).

pub fn current_char_format_changed(&self) -> Signal<(*const QTextCharFormat,)>[src]

This signal is emitted if the current character format has changed, for example caused by a change of the cursor position.

Returns a built-in Qt signal QTextEdit::currentCharFormatChanged that can be passed to qt_core::Signal::connect.

C++ documentation:

This signal is emitted if the current character format has changed, for example caused by a change of the cursor position.

The new format is f.

See also setCurrentCharFormat().

pub fn copy_available(&self) -> Signal<(bool,)>[src]

This signal is emitted when text is selected or de-selected in the text edit.

Returns a built-in Qt signal QTextEdit::copyAvailable that can be passed to qt_core::Signal::connect.

C++ documentation:

This signal is emitted when text is selected or de-selected in the text edit.

When text is selected this signal will be emitted with yes set to true. If no text has been selected or if the selected text is de-selected this signal is emitted with yes set to false.

If yes is true then copy() can be used to copy the selection to the clipboard. If yes is false then copy() does nothing.

See also selectionChanged().

pub fn selection_changed(&self) -> Signal<()>[src]

This signal is emitted whenever the selection changes.

Returns a built-in Qt signal QTextEdit::selectionChanged that can be passed to qt_core::Signal::connect.

C++ documentation:

This signal is emitted whenever the selection changes.

See also copyAvailable().

pub fn cursor_position_changed(&self) -> Signal<()>[src]

This signal is emitted whenever the position of the cursor changed.

Returns a built-in Qt signal QTextEdit::cursorPositionChanged that can be passed to qt_core::Signal::connect.

C++ documentation:

This signal is emitted whenever the position of the cursor changed.

pub unsafe fn accept_rich_text(&self) -> bool[src]

This property holds whether the text edit accepts rich text insertions by the user

Calls C++ function: bool QTextEdit::acceptRichText() const.

C++ documentation:

This property holds whether the text edit accepts rich text insertions by the user

When this propery is set to false text edit will accept only plain text input from the user. For example through clipboard or drag and drop.

This property's default is true.

This property was introduced in Qt 4.1.

Access functions:

bool acceptRichText() const
void setAcceptRichText(bool accept)

pub unsafe fn alignment(&self) -> QFlags<AlignmentFlag>[src]

Returns the alignment of the current paragraph.

Calls C++ function: QFlags<Qt::AlignmentFlag> QTextEdit::alignment() const.

C++ documentation:

Returns the alignment of the current paragraph.

See also setAlignment().

pub unsafe fn anchor_at(
    &self,
    pos: impl CastInto<Ref<QPoint>>
) -> CppBox<QString>
[src]

Returns the reference of the anchor at position pos, or an empty string if no anchor exists at that point.

Calls C++ function: QString QTextEdit::anchorAt(const QPoint& pos) const.

C++ documentation:

Returns the reference of the anchor at position pos, or an empty string if no anchor exists at that point.

pub unsafe fn append(&mut self, text: impl CastInto<Ref<QString>>)[src]

Appends a new paragraph with text to the end of the text edit.

Calls C++ function: [slot] void QTextEdit::append(const QString& text).

C++ documentation:

Appends a new paragraph with text to the end of the text edit.

Note: The new paragraph appended will have the same character format and block format as the current paragraph, determined by the position of the cursor.

See also currentCharFormat() and QTextCursor::blockFormat().

pub unsafe fn auto_formatting(&self) -> QFlags<AutoFormattingFlag>[src]

This property holds the enabled set of auto formatting features

Calls C++ function: QFlags<QTextEdit::AutoFormattingFlag> QTextEdit::autoFormatting() const.

C++ documentation:

This property holds the enabled set of auto formatting features

The value can be any combination of the values in the AutoFormattingFlag enum. The default is AutoNone. Choose AutoAll to enable all automatic formatting.

Currently, the only automatic formatting feature provided is AutoBulletList; future versions of Qt may offer more.

Access functions:

AutoFormatting autoFormatting() const
void setAutoFormatting(AutoFormatting features)

pub unsafe fn can_paste(&self) -> bool[src]

Returns whether text can be pasted from the clipboard into the textedit.

Calls C++ function: bool QTextEdit::canPaste() const.

C++ documentation:

Returns whether text can be pasted from the clipboard into the textedit.

This function was introduced in Qt 4.2.

pub unsafe fn clear(&mut self)[src]

Deletes all the text in the text edit.

Calls C++ function: [slot] void QTextEdit::clear().

C++ documentation:

Deletes all the text in the text edit.

Note that the undo/redo history is cleared by this function.

See also cut(), setPlainText(), and setHtml().

pub unsafe fn copy(&mut self)[src]

Copies any selected text to the clipboard.

Calls C++ function: [slot] void QTextEdit::copy().

C++ documentation:

Copies any selected text to the clipboard.

See also copyAvailable().

pub unsafe fn create_standard_context_menu_0a(&mut self) -> MutPtr<QMenu>[src]

This function creates the standard context menu which is shown when the user clicks on the text edit with the right mouse button. It is called from the default contextMenuEvent() handler. The popup menu's ownership is transferred to the caller.

Calls C++ function: QMenu* QTextEdit::createStandardContextMenu().

C++ documentation:

This function creates the standard context menu which is shown when the user clicks on the text edit with the right mouse button. It is called from the default contextMenuEvent() handler. The popup menu's ownership is transferred to the caller.

We recommend that you use the createStandardContextMenu(QPoint) version instead which will enable the actions that are sensitive to where the user clicked.

pub unsafe fn create_standard_context_menu_1a(
    &mut self,
    position: impl CastInto<Ref<QPoint>>
) -> MutPtr<QMenu>
[src]

This function creates the standard context menu which is shown when the user clicks on the text edit with the right mouse button. It is called from the default contextMenuEvent() handler and it takes the position in document coordinates where the mouse click was. This can enable actions that are sensitive to the position where the user clicked. The popup menu's ownership is transferred to the caller.

Calls C++ function: QMenu* QTextEdit::createStandardContextMenu(const QPoint& position).

C++ documentation:

This function creates the standard context menu which is shown when the user clicks on the text edit with the right mouse button. It is called from the default contextMenuEvent() handler and it takes the position in document coordinates where the mouse click was. This can enable actions that are sensitive to the position where the user clicked. The popup menu's ownership is transferred to the caller.

This function was introduced in Qt 4.4.

pub unsafe fn current_char_format(&self) -> CppBox<QTextCharFormat>[src]

Returns the char format that is used when inserting new text.

Calls C++ function: QTextCharFormat QTextEdit::currentCharFormat() const.

C++ documentation:

Returns the char format that is used when inserting new text.

See also setCurrentCharFormat().

pub unsafe fn current_font(&self) -> CppBox<QFont>[src]

Returns the font of the current format.

Calls C++ function: QFont QTextEdit::currentFont() const.

C++ documentation:

Returns the font of the current format.

See also setCurrentFont(), setFontFamily(), and setFontPointSize().

pub unsafe fn cursor_for_position(
    &self,
    pos: impl CastInto<Ref<QPoint>>
) -> CppBox<QTextCursor>
[src]

returns a QTextCursor at position pos (in viewport coordinates).

Calls C++ function: QTextCursor QTextEdit::cursorForPosition(const QPoint& pos) const.

C++ documentation:

returns a QTextCursor at position pos (in viewport coordinates).

pub unsafe fn cursor_rect_1a(
    &self,
    cursor: impl CastInto<Ref<QTextCursor>>
) -> CppBox<QRect>
[src]

returns a rectangle (in viewport coordinates) that includes the cursor.

Calls C++ function: QRect QTextEdit::cursorRect(const QTextCursor& cursor) const.

C++ documentation:

returns a rectangle (in viewport coordinates) that includes the cursor.

pub unsafe fn cursor_rect_0a(&self) -> CppBox<QRect>[src]

returns a rectangle (in viewport coordinates) that includes the cursor of the text edit.

Calls C++ function: QRect QTextEdit::cursorRect() const.

C++ documentation:

returns a rectangle (in viewport coordinates) that includes the cursor of the text edit.

pub unsafe fn cursor_width(&self) -> c_int[src]

This property specifies the width of the cursor in pixels. The default value is 1.

Calls C++ function: int QTextEdit::cursorWidth() const.

C++ documentation:

This property specifies the width of the cursor in pixels. The default value is 1.

This property was introduced in Qt 4.2.

Access functions:

int cursorWidth() const
void setCursorWidth(int width)

pub unsafe fn cut(&mut self)[src]

Copies the selected text to the clipboard and deletes it from the text edit.

Calls C++ function: [slot] void QTextEdit::cut().

C++ documentation:

Copies the selected text to the clipboard and deletes it from the text edit.

If there is no selected text nothing happens.

See also copy() and paste().

pub unsafe fn document(&self) -> MutPtr<QTextDocument>[src]

This property holds the underlying document of the text editor.

Calls C++ function: QTextDocument* QTextEdit::document() const.

C++ documentation:

This property holds the underlying document of the text editor.

Note: The editor does not take ownership of the document unless it is the document's parent object. The parent object of the provided document remains the owner of the object. If the previously assigned document is a child of the editor then it will be deleted.

Access functions:

QTextDocument *document() const
void setDocument(QTextDocument *document)

pub unsafe fn document_title(&self) -> CppBox<QString>[src]

This property holds the title of the document parsed from the text.

Calls C++ function: QString QTextEdit::documentTitle() const.

C++ documentation:

This property holds the title of the document parsed from the text.

By default, for a newly-created, empty document, this property contains an empty string.

Access functions:

QString documentTitle() const
void setDocumentTitle(const QString &title)

pub unsafe fn ensure_cursor_visible(&mut self)[src]

Ensures that the cursor is visible by scrolling the text edit if necessary.

Calls C++ function: void QTextEdit::ensureCursorVisible().

C++ documentation:

Ensures that the cursor is visible by scrolling the text edit if necessary.

pub unsafe fn extra_selections(&self) -> CppBox<QListOfExtraSelection>[src]

Returns previously set extra selections.

Calls C++ function: QList<QTextEdit::ExtraSelection> QTextEdit::extraSelections() const.

C++ documentation:

Returns previously set extra selections.

This function was introduced in Qt 4.2.

See also setExtraSelections().

pub unsafe fn find_q_string_q_flags_find_flag(
    &mut self,
    exp: impl CastInto<Ref<QString>>,
    options: QFlags<FindFlag>
) -> bool
[src]

Finds the next occurrence of the string, exp, using the given options. Returns true if exp was found and changes the cursor to select the match; otherwise returns false.

Calls C++ function: bool QTextEdit::find(const QString& exp, QFlags<QTextDocument::FindFlag> options = …).

C++ documentation:

Finds the next occurrence of the string, exp, using the given options. Returns true if exp was found and changes the cursor to select the match; otherwise returns false.

pub unsafe fn find_q_reg_exp_q_flags_find_flag(
    &mut self,
    exp: impl CastInto<Ref<QRegExp>>,
    options: QFlags<FindFlag>
) -> bool
[src]

This is an overloaded function.

Calls C++ function: bool QTextEdit::find(const QRegExp& exp, QFlags<QTextDocument::FindFlag> options = …).

C++ documentation:

This is an overloaded function.

Finds the next occurrence, matching the regular expression, exp, using the given options. The QTextDocument::FindCaseSensitively option is ignored for this overload, use QRegExp::caseSensitivity instead.

Returns true if a match was found and changes the cursor to select the match; otherwise returns false.

This function was introduced in Qt 5.3.

pub unsafe fn find_q_string(&mut self, exp: impl CastInto<Ref<QString>>) -> bool[src]

Finds the next occurrence of the string, exp, using the given options. Returns true if exp was found and changes the cursor to select the match; otherwise returns false.

Calls C++ function: bool QTextEdit::find(const QString& exp).

C++ documentation:

Finds the next occurrence of the string, exp, using the given options. Returns true if exp was found and changes the cursor to select the match; otherwise returns false.

pub unsafe fn find_q_reg_exp(
    &mut self,
    exp: impl CastInto<Ref<QRegExp>>
) -> bool
[src]

This is an overloaded function.

Calls C++ function: bool QTextEdit::find(const QRegExp& exp).

C++ documentation:

This is an overloaded function.

Finds the next occurrence, matching the regular expression, exp, using the given options. The QTextDocument::FindCaseSensitively option is ignored for this overload, use QRegExp::caseSensitivity instead.

Returns true if a match was found and changes the cursor to select the match; otherwise returns false.

This function was introduced in Qt 5.3.

pub unsafe fn find_q_regular_expression_q_flags_find_flag(
    &mut self,
    exp: impl CastInto<Ref<QRegularExpression>>,
    options: QFlags<FindFlag>
) -> bool
[src]

This is an overloaded function.

Calls C++ function: bool QTextEdit::find(const QRegularExpression& exp, QFlags<QTextDocument::FindFlag> options = …).

C++ documentation:

This is an overloaded function.

Finds the next occurrence, matching the regular expression, exp, using the given options. The QTextDocument::FindCaseSensitively option is ignored for this overload, use QRegularExpression::CaseInsensitiveOption instead.

Returns true if a match was found and changes the cursor to select the match; otherwise returns false.

This function was introduced in Qt 5.13.

This item is available if cpp_lib_version="5.13.0".

pub unsafe fn find_q_regular_expression(
    &mut self,
    exp: impl CastInto<Ref<QRegularExpression>>
) -> bool
[src]

This is an overloaded function.

Calls C++ function: bool QTextEdit::find(const QRegularExpression& exp).

C++ documentation:

This is an overloaded function.

Finds the next occurrence, matching the regular expression, exp, using the given options. The QTextDocument::FindCaseSensitively option is ignored for this overload, use QRegularExpression::CaseInsensitiveOption instead.

Returns true if a match was found and changes the cursor to select the match; otherwise returns false.

This function was introduced in Qt 5.13.

This item is available if cpp_lib_version="5.13.0".

pub unsafe fn font_family(&self) -> CppBox<QString>[src]

Returns the font family of the current format.

Calls C++ function: QString QTextEdit::fontFamily() const.

C++ documentation:

Returns the font family of the current format.

See also setFontFamily(), setCurrentFont(), and setFontPointSize().

pub unsafe fn font_italic(&self) -> bool[src]

Returns true if the font of the current format is italic; otherwise returns false.

Calls C++ function: bool QTextEdit::fontItalic() const.

C++ documentation:

Returns true if the font of the current format is italic; otherwise returns false.

See also setFontItalic().

pub unsafe fn font_point_size(&self) -> c_double[src]

Returns the point size of the font of the current format.

Calls C++ function: double QTextEdit::fontPointSize() const.

C++ documentation:

Returns the point size of the font of the current format.

See also setFontFamily(), setCurrentFont(), and setFontPointSize().

pub unsafe fn font_underline(&self) -> bool[src]

Returns true if the font of the current format is underlined; otherwise returns false.

Calls C++ function: bool QTextEdit::fontUnderline() const.

C++ documentation:

Returns true if the font of the current format is underlined; otherwise returns false.

See also setFontUnderline().

pub unsafe fn font_weight(&self) -> c_int[src]

Returns the font weight of the current format.

Calls C++ function: int QTextEdit::fontWeight() const.

C++ documentation:

Returns the font weight of the current format.

See also setFontWeight(), setCurrentFont(), setFontPointSize(), and QFont::Weight.

pub unsafe fn input_method_query_1a(
    &self,
    property: InputMethodQuery
) -> CppBox<QVariant>
[src]

Reimplemented from QWidget::inputMethodQuery().

Calls C++ function: virtual QVariant QTextEdit::inputMethodQuery(Qt::InputMethodQuery property) const.

C++ documentation:

Reimplemented from QWidget::inputMethodQuery().

pub unsafe fn input_method_query_2a(
    &self,
    query: InputMethodQuery,
    argument: impl CastInto<Ref<QVariant>>
) -> CppBox<QVariant>
[src]

Reimplemented from QWidget::inputMethodQuery().

Calls C++ function: QVariant QTextEdit::inputMethodQuery(Qt::InputMethodQuery query, QVariant argument) const.

Warning: no exact match found in C++ documentation. Below is the C++ documentation for virtual QVariant QTextEdit::inputMethodQuery(Qt::InputMethodQuery property) const:

Reimplemented from QWidget::inputMethodQuery().

pub unsafe fn insert_html(&mut self, text: impl CastInto<Ref<QString>>)[src]

Convenience slot that inserts text which is assumed to be of html formatting at the current cursor position.

Calls C++ function: [slot] void QTextEdit::insertHtml(const QString& text).

C++ documentation:

Convenience slot that inserts text which is assumed to be of html formatting at the current cursor position.

It is equivalent to:

edit->textCursor().insertHtml(fragment);

Note: When using this function with a style sheet, the style sheet will only apply to the current block in the document. In order to apply a style sheet throughout a document, use QTextDocument::setDefaultStyleSheet() instead.

pub unsafe fn insert_plain_text(&mut self, text: impl CastInto<Ref<QString>>)[src]

Convenience slot that inserts text at the current cursor position.

Calls C++ function: [slot] void QTextEdit::insertPlainText(const QString& text).

C++ documentation:

Convenience slot that inserts text at the current cursor position.

It is equivalent to

edit->textCursor().insertText(text);

pub unsafe fn is_read_only(&self) -> bool[src]

This property holds whether the text edit is read-only

Calls C++ function: bool QTextEdit::isReadOnly() const.

C++ documentation:

This property holds whether the text edit is read-only

In a read-only text edit the user can only navigate through the text and select text; modifying the text is not possible.

This property's default is false.

Access functions:

bool isReadOnly() const
void setReadOnly(bool ro)

pub unsafe fn is_undo_redo_enabled(&self) -> bool[src]

This property holds whether undo and redo are enabled

Calls C++ function: bool QTextEdit::isUndoRedoEnabled() const.

C++ documentation:

This property holds whether undo and redo are enabled

Users are only able to undo or redo actions if this property is true, and if there is an action that can be undone (or redone).

Access functions:

bool isUndoRedoEnabled() const
void setUndoRedoEnabled(bool enable)

pub unsafe fn line_wrap_column_or_width(&self) -> c_int[src]

This property holds the position (in pixels or columns depending on the wrap mode) where text will be wrapped

Calls C++ function: int QTextEdit::lineWrapColumnOrWidth() const.

C++ documentation:

This property holds the position (in pixels or columns depending on the wrap mode) where text will be wrapped

If the wrap mode is FixedPixelWidth, the value is the number of pixels from the left edge of the text edit at which text should be wrapped. If the wrap mode is FixedColumnWidth, the value is the column number (in character columns) from the left edge of the text edit at which text should be wrapped.

By default, this property contains a value of 0.

Access functions:

int lineWrapColumnOrWidth() const
void setLineWrapColumnOrWidth(int w)

See also lineWrapMode.

pub unsafe fn line_wrap_mode(&self) -> LineWrapMode[src]

This property holds the line wrap mode

Calls C++ function: QTextEdit::LineWrapMode QTextEdit::lineWrapMode() const.

C++ documentation:

This property holds the line wrap mode

The default mode is WidgetWidth which causes words to be wrapped at the right edge of the text edit. Wrapping occurs at whitespace, keeping whole words intact. If you want wrapping to occur within words use setWordWrapMode(). If you set a wrap mode of FixedPixelWidth or FixedColumnWidth you should also call setLineWrapColumnOrWidth() with the width you want.

Access functions:

LineWrapMode lineWrapMode() const
void setLineWrapMode(LineWrapMode mode)

See also lineWrapColumnOrWidth.

pub unsafe fn load_resource(
    &mut self,
    type_: c_int,
    name: impl CastInto<Ref<QUrl>>
) -> CppBox<QVariant>
[src]

Loads the resource specified by the given type and name.

Calls C++ function: virtual QVariant QTextEdit::loadResource(int type, const QUrl& name).

C++ documentation:

Loads the resource specified by the given type and name.

This function is an extension of QTextDocument::loadResource().

See also QTextDocument::loadResource().

pub unsafe fn merge_current_char_format(
    &mut self,
    modifier: impl CastInto<Ref<QTextCharFormat>>
)
[src]

Merges the properties specified in modifier into the current character format by calling QTextCursor::mergeCharFormat on the editor's cursor. If the editor has a selection then the properties of modifier are directly applied to the selection.

Calls C++ function: void QTextEdit::mergeCurrentCharFormat(const QTextCharFormat& modifier).

C++ documentation:

Merges the properties specified in modifier into the current character format by calling QTextCursor::mergeCharFormat on the editor's cursor. If the editor has a selection then the properties of modifier are directly applied to the selection.

See also QTextCursor::mergeCharFormat().

pub unsafe fn meta_object(&self) -> Ptr<QMetaObject>[src]

Calls C++ function: virtual const QMetaObject* QTextEdit::metaObject() const.

pub unsafe fn move_cursor_2a(
    &mut self,
    operation: MoveOperation,
    mode: MoveMode
)
[src]

Moves the cursor by performing the given operation.

Calls C++ function: void QTextEdit::moveCursor(QTextCursor::MoveOperation operation, QTextCursor::MoveMode mode = …).

C++ documentation:

Moves the cursor by performing the given operation.

If mode is QTextCursor::KeepAnchor, the cursor selects the text it moves over. This is the same effect that the user achieves when they hold down the Shift key and move the cursor with the cursor keys.

This function was introduced in Qt 4.2.

See also QTextCursor::movePosition().

pub unsafe fn move_cursor_1a(&mut self, operation: MoveOperation)[src]

Moves the cursor by performing the given operation.

Calls C++ function: void QTextEdit::moveCursor(QTextCursor::MoveOperation operation).

C++ documentation:

Moves the cursor by performing the given operation.

If mode is QTextCursor::KeepAnchor, the cursor selects the text it moves over. This is the same effect that the user achieves when they hold down the Shift key and move the cursor with the cursor keys.

This function was introduced in Qt 4.2.

See also QTextCursor::movePosition().

pub unsafe fn overwrite_mode(&self) -> bool[src]

This property holds whether text entered by the user will overwrite existing text

Calls C++ function: bool QTextEdit::overwriteMode() const.

C++ documentation:

This property holds whether text entered by the user will overwrite existing text

As with many text editors, the text editor widget can be configured to insert or overwrite existing text with new text entered by the user.

If this property is true, existing text is overwritten, character-for-character by new text; otherwise, text is inserted at the cursor position, displacing existing text.

By default, this property is false (new text does not overwrite existing text).

This property was introduced in Qt 4.1.

Access functions:

bool overwriteMode() const
void setOverwriteMode(bool overwrite)

pub unsafe fn paste(&mut self)[src]

Pastes the text from the clipboard into the text edit at the current cursor position.

Calls C++ function: [slot] void QTextEdit::paste().

C++ documentation:

Pastes the text from the clipboard into the text edit at the current cursor position.

If there is no text in the clipboard nothing happens.

To change the behavior of this function, i.e. to modify what QTextEdit can paste and how it is being pasted, reimplement the virtual canInsertFromMimeData() and insertFromMimeData() functions.

See also cut() and copy().

pub unsafe fn placeholder_text(&self) -> CppBox<QString>[src]

This property holds the editor placeholder text

Calls C++ function: QString QTextEdit::placeholderText() const.

C++ documentation:

This property holds the editor placeholder text

Setting this property makes the editor display a grayed-out placeholder text as long as the document() is empty.

By default, this property contains an empty string.

This property was introduced in Qt 5.2.

Access functions:

QString placeholderText() const
void setPlaceholderText(const QString &placeholderText)

See also document().

pub unsafe fn print(&self, printer: impl CastInto<MutPtr<QPagedPaintDevice>>)[src]

Convenience function to print the text edit's document to the given printer. This is equivalent to calling the print method on the document directly except that this function also supports QPrinter::Selection as print range.

Calls C++ function: void QTextEdit::print(QPagedPaintDevice* printer) const.

C++ documentation:

Convenience function to print the text edit's document to the given printer. This is equivalent to calling the print method on the document directly except that this function also supports QPrinter::Selection as print range.

This function was introduced in Qt 4.3.

See also QTextDocument::print().

pub unsafe fn qt_metacall(
    &mut self,
    arg1: Call,
    arg2: c_int,
    arg3: impl CastInto<MutPtr<*mut c_void>>
) -> c_int
[src]

Calls C++ function: virtual int QTextEdit::qt_metacall(QMetaObject::Call arg1, int arg2, void** arg3).

pub unsafe fn qt_metacast(
    &mut self,
    arg1: impl CastInto<Ptr<c_char>>
) -> MutPtr<c_void>
[src]

Calls C++ function: virtual void* QTextEdit::qt_metacast(const char* arg1).

pub unsafe fn redo(&mut self)[src]

Redoes the last operation.

Calls C++ function: [slot] void QTextEdit::redo().

C++ documentation:

Redoes the last operation.

If there is no operation to redo, i.e. there is no redo step in the undo/redo history, nothing happens.

This function was introduced in Qt 4.2.

See also undo().

pub unsafe fn scroll_to_anchor(&mut self, name: impl CastInto<Ref<QString>>)[src]

Scrolls the text edit so that the anchor with the given name is visible; does nothing if the name is empty, or is already visible, or isn't found.

Calls C++ function: [slot] void QTextEdit::scrollToAnchor(const QString& name).

C++ documentation:

Scrolls the text edit so that the anchor with the given name is visible; does nothing if the name is empty, or is already visible, or isn't found.

pub unsafe fn select_all(&mut self)[src]

Selects all text.

Calls C++ function: [slot] void QTextEdit::selectAll().

C++ documentation:

Selects all text.

See also copy(), cut(), and textCursor().

pub unsafe fn set_accept_rich_text(&mut self, accept: bool)[src]

This property holds whether the text edit accepts rich text insertions by the user

Calls C++ function: void QTextEdit::setAcceptRichText(bool accept).

C++ documentation:

This property holds whether the text edit accepts rich text insertions by the user

When this propery is set to false text edit will accept only plain text input from the user. For example through clipboard or drag and drop.

This property's default is true.

This property was introduced in Qt 4.1.

Access functions:

bool acceptRichText() const
void setAcceptRichText(bool accept)

pub unsafe fn set_alignment(&mut self, a: QFlags<AlignmentFlag>)[src]

Sets the alignment of the current paragraph to a. Valid alignments are Qt::AlignLeft, Qt::AlignRight, Qt::AlignJustify and Qt::AlignCenter (which centers horizontally).

Calls C++ function: [slot] void QTextEdit::setAlignment(QFlags<Qt::AlignmentFlag> a).

C++ documentation:

Sets the alignment of the current paragraph to a. Valid alignments are Qt::AlignLeft, Qt::AlignRight, Qt::AlignJustify and Qt::AlignCenter (which centers horizontally).

See also alignment().

pub unsafe fn set_auto_formatting(
    &mut self,
    features: QFlags<AutoFormattingFlag>
)
[src]

This property holds the enabled set of auto formatting features

Calls C++ function: void QTextEdit::setAutoFormatting(QFlags<QTextEdit::AutoFormattingFlag> features).

C++ documentation:

This property holds the enabled set of auto formatting features

The value can be any combination of the values in the AutoFormattingFlag enum. The default is AutoNone. Choose AutoAll to enable all automatic formatting.

Currently, the only automatic formatting feature provided is AutoBulletList; future versions of Qt may offer more.

Access functions:

AutoFormatting autoFormatting() const
void setAutoFormatting(AutoFormatting features)

pub unsafe fn set_current_char_format(
    &mut self,
    format: impl CastInto<Ref<QTextCharFormat>>
)
[src]

Sets the char format that is be used when inserting new text to format by calling QTextCursor::setCharFormat() on the editor's cursor. If the editor has a selection then the char format is directly applied to the selection.

Calls C++ function: void QTextEdit::setCurrentCharFormat(const QTextCharFormat& format).

C++ documentation:

Sets the char format that is be used when inserting new text to format by calling QTextCursor::setCharFormat() on the editor's cursor. If the editor has a selection then the char format is directly applied to the selection.

See also currentCharFormat().

pub unsafe fn set_current_font(&mut self, f: impl CastInto<Ref<QFont>>)[src]

Sets the font of the current format to f.

Calls C++ function: [slot] void QTextEdit::setCurrentFont(const QFont& f).

C++ documentation:

Sets the font of the current format to f.

See also currentFont(), setFontPointSize(), and setFontFamily().

pub unsafe fn set_cursor_width(&mut self, width: c_int)[src]

This property specifies the width of the cursor in pixels. The default value is 1.

Calls C++ function: void QTextEdit::setCursorWidth(int width).

C++ documentation:

This property specifies the width of the cursor in pixels. The default value is 1.

This property was introduced in Qt 4.2.

Access functions:

int cursorWidth() const
void setCursorWidth(int width)

pub unsafe fn set_document(
    &mut self,
    document: impl CastInto<MutPtr<QTextDocument>>
)
[src]

This property holds the underlying document of the text editor.

Calls C++ function: void QTextEdit::setDocument(QTextDocument* document).

C++ documentation:

This property holds the underlying document of the text editor.

Note: The editor does not take ownership of the document unless it is the document's parent object. The parent object of the provided document remains the owner of the object. If the previously assigned document is a child of the editor then it will be deleted.

Access functions:

QTextDocument *document() const
void setDocument(QTextDocument *document)

pub unsafe fn set_document_title(&mut self, title: impl CastInto<Ref<QString>>)[src]

This property holds the title of the document parsed from the text.

Calls C++ function: void QTextEdit::setDocumentTitle(const QString& title).

C++ documentation:

This property holds the title of the document parsed from the text.

By default, for a newly-created, empty document, this property contains an empty string.

Access functions:

QString documentTitle() const
void setDocumentTitle(const QString &title)

pub unsafe fn set_extra_selections(
    &mut self,
    selections: impl CastInto<Ref<QListOfExtraSelection>>
)
[src]

This function allows temporarily marking certain regions in the document with a given color, specified as selections. This can be useful for example in a programming editor to mark a whole line of text with a given background color to indicate the existence of a breakpoint.

Calls C++ function: void QTextEdit::setExtraSelections(const QList<QTextEdit::ExtraSelection>& selections).

C++ documentation:

This function allows temporarily marking certain regions in the document with a given color, specified as selections. This can be useful for example in a programming editor to mark a whole line of text with a given background color to indicate the existence of a breakpoint.

This function was introduced in Qt 4.2.

See also QTextEdit::ExtraSelection and extraSelections().

pub unsafe fn set_font_family(
    &mut self,
    font_family: impl CastInto<Ref<QString>>
)
[src]

Sets the font family of the current format to fontFamily.

Calls C++ function: [slot] void QTextEdit::setFontFamily(const QString& fontFamily).

C++ documentation:

Sets the font family of the current format to fontFamily.

See also fontFamily() and setCurrentFont().

pub unsafe fn set_font_italic(&mut self, b: bool)[src]

If italic is true, sets the current format to italic; otherwise sets the current format to non-italic.

Calls C++ function: [slot] void QTextEdit::setFontItalic(bool b).

C++ documentation:

If italic is true, sets the current format to italic; otherwise sets the current format to non-italic.

See also fontItalic().

pub unsafe fn set_font_point_size(&mut self, s: c_double)[src]

Sets the point size of the current format to s.

Calls C++ function: [slot] void QTextEdit::setFontPointSize(double s).

C++ documentation:

Sets the point size of the current format to s.

Note that if s is zero or negative, the behavior of this function is not defined.

See also fontPointSize(), setCurrentFont(), and setFontFamily().

pub unsafe fn set_font_underline(&mut self, b: bool)[src]

If underline is true, sets the current format to underline; otherwise sets the current format to non-underline.

Calls C++ function: [slot] void QTextEdit::setFontUnderline(bool b).

C++ documentation:

If underline is true, sets the current format to underline; otherwise sets the current format to non-underline.

See also fontUnderline().

pub unsafe fn set_font_weight(&mut self, w: c_int)[src]

Sets the font weight of the current format to the given weight, where the value used is in the range defined by the QFont::Weight enum.

Calls C++ function: [slot] void QTextEdit::setFontWeight(int w).

C++ documentation:

Sets the font weight of the current format to the given weight, where the value used is in the range defined by the QFont::Weight enum.

See also fontWeight(), setCurrentFont(), and setFontFamily().

pub unsafe fn set_html(&mut self, text: impl CastInto<Ref<QString>>)[src]

This property provides an HTML interface to the text of the text edit.

Calls C++ function: [slot] void QTextEdit::setHtml(const QString& text).

C++ documentation:

This property provides an HTML interface to the text of the text edit.

toHtml() returns the text of the text edit as html.

setHtml() changes the text of the text edit. Any previous text is removed and the undo/redo history is cleared. The input text is interpreted as rich text in html format.

Note: It is the responsibility of the caller to make sure that the text is correctly decoded when a QString containing HTML is created and passed to setHtml().

By default, for a newly-created, empty document, this property contains text to describe an HTML 4.0 document with no body text.

Access functions:

QString toHtml() const
void setHtml(const QString &text)

Notifier signal:

void textChanged()

See also Supported HTML Subset and plainText.

pub unsafe fn set_line_wrap_column_or_width(&mut self, w: c_int)[src]

This property holds the position (in pixels or columns depending on the wrap mode) where text will be wrapped

Calls C++ function: void QTextEdit::setLineWrapColumnOrWidth(int w).

C++ documentation:

This property holds the position (in pixels or columns depending on the wrap mode) where text will be wrapped

If the wrap mode is FixedPixelWidth, the value is the number of pixels from the left edge of the text edit at which text should be wrapped. If the wrap mode is FixedColumnWidth, the value is the column number (in character columns) from the left edge of the text edit at which text should be wrapped.

By default, this property contains a value of 0.

Access functions:

int lineWrapColumnOrWidth() const
void setLineWrapColumnOrWidth(int w)

See also lineWrapMode.

pub unsafe fn set_line_wrap_mode(&mut self, mode: LineWrapMode)[src]

This property holds the line wrap mode

Calls C++ function: void QTextEdit::setLineWrapMode(QTextEdit::LineWrapMode mode).

C++ documentation:

This property holds the line wrap mode

The default mode is WidgetWidth which causes words to be wrapped at the right edge of the text edit. Wrapping occurs at whitespace, keeping whole words intact. If you want wrapping to occur within words use setWordWrapMode(). If you set a wrap mode of FixedPixelWidth or FixedColumnWidth you should also call setLineWrapColumnOrWidth() with the width you want.

Access functions:

LineWrapMode lineWrapMode() const
void setLineWrapMode(LineWrapMode mode)

See also lineWrapColumnOrWidth.

pub unsafe fn set_overwrite_mode(&mut self, overwrite: bool)[src]

This property holds whether text entered by the user will overwrite existing text

Calls C++ function: void QTextEdit::setOverwriteMode(bool overwrite).

C++ documentation:

This property holds whether text entered by the user will overwrite existing text

As with many text editors, the text editor widget can be configured to insert or overwrite existing text with new text entered by the user.

If this property is true, existing text is overwritten, character-for-character by new text; otherwise, text is inserted at the cursor position, displacing existing text.

By default, this property is false (new text does not overwrite existing text).

This property was introduced in Qt 4.1.

Access functions:

bool overwriteMode() const
void setOverwriteMode(bool overwrite)

pub unsafe fn set_placeholder_text(
    &mut self,
    placeholder_text: impl CastInto<Ref<QString>>
)
[src]

This property holds the editor placeholder text

Calls C++ function: void QTextEdit::setPlaceholderText(const QString& placeholderText).

C++ documentation:

This property holds the editor placeholder text

Setting this property makes the editor display a grayed-out placeholder text as long as the document() is empty.

By default, this property contains an empty string.

This property was introduced in Qt 5.2.

Access functions:

QString placeholderText() const
void setPlaceholderText(const QString &placeholderText)

See also document().

pub unsafe fn set_plain_text(&mut self, text: impl CastInto<Ref<QString>>)[src]

Changes the text of the text edit to the string text. Any previous text is removed.

Calls C++ function: [slot] void QTextEdit::setPlainText(const QString& text).

C++ documentation:

Changes the text of the text edit to the string text. Any previous text is removed.

text is interpreted as plain text.

Note that the undo/redo history is cleared by this function.

Note: Setter function for property plainText.

See also toPlainText().

pub unsafe fn set_read_only(&mut self, ro: bool)[src]

This property holds whether the text edit is read-only

Calls C++ function: void QTextEdit::setReadOnly(bool ro).

C++ documentation:

This property holds whether the text edit is read-only

In a read-only text edit the user can only navigate through the text and select text; modifying the text is not possible.

This property's default is false.

Access functions:

bool isReadOnly() const
void setReadOnly(bool ro)

pub unsafe fn set_tab_changes_focus(&mut self, b: bool)[src]

This property holds whether Tab changes focus or is accepted as input

Calls C++ function: void QTextEdit::setTabChangesFocus(bool b).

C++ documentation:

This property holds whether Tab changes focus or is accepted as input

In some occasions text edits should not allow the user to input tabulators or change indentation using the Tab key, as this breaks the focus chain. The default is false.

Access functions:

bool tabChangesFocus() const
void setTabChangesFocus(bool b)

pub unsafe fn set_tab_stop_distance(&mut self, distance: c_double)[src]

This property holds the tab stop distance in pixels

Calls C++ function: void QTextEdit::setTabStopDistance(double distance).

C++ documentation:

This property holds the tab stop distance in pixels

By default, this property contains a value of 80 pixels.

This property was introduced in Qt 5.10.

Access functions:

qreal tabStopDistance() const
void setTabStopDistance(qreal distance)

This item is available if any(cpp_lib_version="5.11.3", cpp_lib_version="5.12.2", cpp_lib_version="5.13.0").

pub unsafe fn set_tab_stop_width(&mut self, width: c_int)[src]

This property holds the tab stop width in pixels

Calls C++ function: void QTextEdit::setTabStopWidth(int width).

C++ documentation:

This property holds the tab stop width in pixels

By default, this property contains a value of 80 pixels.

This property was introduced in Qt 4.1.

Access functions:

int tabStopWidth() const
void setTabStopWidth(int width)

pub unsafe fn set_text(&mut self, text: impl CastInto<Ref<QString>>)[src]

Sets the text edit's text. The text can be plain text or HTML and the text edit will try to guess the right format.

Calls C++ function: [slot] void QTextEdit::setText(const QString& text).

C++ documentation:

Sets the text edit's text. The text can be plain text or HTML and the text edit will try to guess the right format.

Use setHtml() or setPlainText() directly to avoid text edit's guessing.

This function was introduced in Qt 4.2.

See also toPlainText() and toHtml().

pub unsafe fn set_text_background_color(
    &mut self,
    c: impl CastInto<Ref<QColor>>
)
[src]

Sets the text background color of the current format to c.

Calls C++ function: [slot] void QTextEdit::setTextBackgroundColor(const QColor& c).

C++ documentation:

Sets the text background color of the current format to c.

This function was introduced in Qt 4.4.

See also textBackgroundColor().

pub unsafe fn set_text_color(&mut self, c: impl CastInto<Ref<QColor>>)[src]

Sets the text color of the current format to c.

Calls C++ function: [slot] void QTextEdit::setTextColor(const QColor& c).

C++ documentation:

Sets the text color of the current format to c.

See also textColor().

pub unsafe fn set_text_cursor(
    &mut self,
    cursor: impl CastInto<Ref<QTextCursor>>
)
[src]

Sets the visible cursor.

Calls C++ function: void QTextEdit::setTextCursor(const QTextCursor& cursor).

C++ documentation:

Sets the visible cursor.

See also textCursor().

pub unsafe fn set_text_interaction_flags(
    &mut self,
    flags: QFlags<TextInteractionFlag>
)
[src]

Specifies how the widget should interact with user input.

Calls C++ function: void QTextEdit::setTextInteractionFlags(QFlags<Qt::TextInteractionFlag> flags).

C++ documentation:

Specifies how the widget should interact with user input.

The default value depends on whether the QTextEdit is read-only or editable, and whether it is a QTextBrowser or not.

This property was introduced in Qt 4.2.

Access functions:

Qt::TextInteractionFlags textInteractionFlags() const
void setTextInteractionFlags(Qt::TextInteractionFlags flags)

pub unsafe fn set_undo_redo_enabled(&mut self, enable: bool)[src]

This property holds whether undo and redo are enabled

Calls C++ function: void QTextEdit::setUndoRedoEnabled(bool enable).

C++ documentation:

This property holds whether undo and redo are enabled

Users are only able to undo or redo actions if this property is true, and if there is an action that can be undone (or redone).

Access functions:

bool isUndoRedoEnabled() const
void setUndoRedoEnabled(bool enable)

pub unsafe fn set_word_wrap_mode(&mut self, policy: WrapMode)[src]

This property holds the mode QTextEdit will use when wrapping text by words

Calls C++ function: void QTextEdit::setWordWrapMode(QTextOption::WrapMode policy).

C++ documentation:

This property holds the mode QTextEdit will use when wrapping text by words

By default, this property is set to QTextOption::WrapAtWordBoundaryOrAnywhere.

Access functions:

QTextOption::WrapMode wordWrapMode() const
void setWordWrapMode(QTextOption::WrapMode policy)

See also QTextOption::WrapMode.

pub unsafe fn tab_changes_focus(&self) -> bool[src]

This property holds whether Tab changes focus or is accepted as input

Calls C++ function: bool QTextEdit::tabChangesFocus() const.

C++ documentation:

This property holds whether Tab changes focus or is accepted as input

In some occasions text edits should not allow the user to input tabulators or change indentation using the Tab key, as this breaks the focus chain. The default is false.

Access functions:

bool tabChangesFocus() const
void setTabChangesFocus(bool b)

pub unsafe fn tab_stop_distance(&self) -> c_double[src]

This property holds the tab stop distance in pixels

Calls C++ function: double QTextEdit::tabStopDistance() const.

C++ documentation:

This property holds the tab stop distance in pixels

By default, this property contains a value of 80 pixels.

This property was introduced in Qt 5.10.

Access functions:

qreal tabStopDistance() const
void setTabStopDistance(qreal distance)

This item is available if any(cpp_lib_version="5.11.3", cpp_lib_version="5.12.2", cpp_lib_version="5.13.0").

pub unsafe fn tab_stop_width(&self) -> c_int[src]

This property holds the tab stop width in pixels

Calls C++ function: int QTextEdit::tabStopWidth() const.

C++ documentation:

This property holds the tab stop width in pixels

By default, this property contains a value of 80 pixels.

This property was introduced in Qt 4.1.

Access functions:

int tabStopWidth() const
void setTabStopWidth(int width)

pub unsafe fn text_background_color(&self) -> CppBox<QColor>[src]

Returns the text background color of the current format.

Calls C++ function: QColor QTextEdit::textBackgroundColor() const.

C++ documentation:

Returns the text background color of the current format.

This function was introduced in Qt 4.4.

See also setTextBackgroundColor().

pub unsafe fn text_color(&self) -> CppBox<QColor>[src]

Returns the text color of the current format.

Calls C++ function: QColor QTextEdit::textColor() const.

C++ documentation:

Returns the text color of the current format.

See also setTextColor().

pub unsafe fn text_cursor(&self) -> CppBox<QTextCursor>[src]

Returns a copy of the QTextCursor that represents the currently visible cursor. Note that changes on the returned cursor do not affect QTextEdit's cursor; use setTextCursor() to update the visible cursor.

Calls C++ function: QTextCursor QTextEdit::textCursor() const.

C++ documentation:

Returns a copy of the QTextCursor that represents the currently visible cursor. Note that changes on the returned cursor do not affect QTextEdit's cursor; use setTextCursor() to update the visible cursor.

See also setTextCursor().

pub unsafe fn text_interaction_flags(&self) -> QFlags<TextInteractionFlag>[src]

Specifies how the widget should interact with user input.

Calls C++ function: QFlags<Qt::TextInteractionFlag> QTextEdit::textInteractionFlags() const.

C++ documentation:

Specifies how the widget should interact with user input.

The default value depends on whether the QTextEdit is read-only or editable, and whether it is a QTextBrowser or not.

This property was introduced in Qt 4.2.

Access functions:

Qt::TextInteractionFlags textInteractionFlags() const
void setTextInteractionFlags(Qt::TextInteractionFlags flags)

pub unsafe fn to_html(&self) -> CppBox<QString>[src]

This property provides an HTML interface to the text of the text edit.

Calls C++ function: QString QTextEdit::toHtml() const.

C++ documentation:

This property provides an HTML interface to the text of the text edit.

toHtml() returns the text of the text edit as html.

setHtml() changes the text of the text edit. Any previous text is removed and the undo/redo history is cleared. The input text is interpreted as rich text in html format.

Note: It is the responsibility of the caller to make sure that the text is correctly decoded when a QString containing HTML is created and passed to setHtml().

By default, for a newly-created, empty document, this property contains text to describe an HTML 4.0 document with no body text.

Access functions:

QString toHtml() const
void setHtml(const QString &text)

Notifier signal:

void textChanged()

See also Supported HTML Subset and plainText.

pub unsafe fn to_plain_text(&self) -> CppBox<QString>[src]

QString QTextEdit::toPlainText() const

Calls C++ function: QString QTextEdit::toPlainText() const.

C++ documentation:

QString QTextEdit::toPlainText() const

Returns the text of the text edit as plain text.

Note: Getter function for property plainText.

See also QTextEdit::setPlainText().

pub unsafe fn undo(&mut self)[src]

Undoes the last operation.

Calls C++ function: [slot] void QTextEdit::undo().

C++ documentation:

Undoes the last operation.

If there is no operation to undo, i.e. there is no undo step in the undo/redo history, nothing happens.

This function was introduced in Qt 4.2.

See also redo().

pub unsafe fn word_wrap_mode(&self) -> WrapMode[src]

This property holds the mode QTextEdit will use when wrapping text by words

Calls C++ function: QTextOption::WrapMode QTextEdit::wordWrapMode() const.

C++ documentation:

This property holds the mode QTextEdit will use when wrapping text by words

By default, this property is set to QTextOption::WrapAtWordBoundaryOrAnywhere.

Access functions:

QTextOption::WrapMode wordWrapMode() const
void setWordWrapMode(QTextOption::WrapMode policy)

See also QTextOption::WrapMode.

pub unsafe fn zoom_in_1a(&mut self, range: c_int)[src]

Zooms in on the text by making the base font size range points larger and recalculating all font sizes to be the new size. This does not change the size of any images.

Calls C++ function: [slot] void QTextEdit::zoomIn(int range = …).

C++ documentation:

Zooms in on the text by making the base font size range points larger and recalculating all font sizes to be the new size. This does not change the size of any images.

See also zoomOut().

pub unsafe fn zoom_in_0a(&mut self)[src]

Zooms in on the text by making the base font size range points larger and recalculating all font sizes to be the new size. This does not change the size of any images.

Calls C++ function: [slot] void QTextEdit::zoomIn().

C++ documentation:

Zooms in on the text by making the base font size range points larger and recalculating all font sizes to be the new size. This does not change the size of any images.

See also zoomOut().

pub unsafe fn zoom_out_1a(&mut self, range: c_int)[src]

Zooms out on the text by making the base font size range points smaller and recalculating all font sizes to be the new size. This does not change the size of any images.

Calls C++ function: [slot] void QTextEdit::zoomOut(int range = …).

C++ documentation:

Zooms out on the text by making the base font size range points smaller and recalculating all font sizes to be the new size. This does not change the size of any images.

See also zoomIn().

pub unsafe fn zoom_out_0a(&mut self)[src]

Zooms out on the text by making the base font size range points smaller and recalculating all font sizes to be the new size. This does not change the size of any images.

Calls C++ function: [slot] void QTextEdit::zoomOut().

C++ documentation:

Zooms out on the text by making the base font size range points smaller and recalculating all font sizes to be the new size. This does not change the size of any images.

See also zoomIn().

Trait Implementations

impl CppDeletable for QTextBrowser[src]

unsafe fn delete(&mut self)[src]

Calls C++ function: virtual [destructor] void QTextBrowser::~QTextBrowser().

impl Deref for QTextBrowser[src]

type Target = QTextEdit

The resulting type after dereferencing.

fn deref(&self) -> &QTextEdit[src]

Calls C++ function: QTextEdit* static_cast<QTextEdit*>(QTextBrowser* ptr).

impl DerefMut for QTextBrowser[src]

fn deref_mut(&mut self) -> &mut QTextEdit[src]

Calls C++ function: QTextEdit* static_cast<QTextEdit*>(QTextBrowser* ptr).

impl DynamicCast<QTextBrowser> for QTextEdit[src]

unsafe fn dynamic_cast(ptr: Ptr<QTextEdit>) -> Ptr<QTextBrowser>[src]

Calls C++ function: QTextBrowser* dynamic_cast<QTextBrowser*>(QTextEdit* ptr).

unsafe fn dynamic_cast_mut(ptr: MutPtr<QTextEdit>) -> MutPtr<QTextBrowser>[src]

Calls C++ function: QTextBrowser* dynamic_cast<QTextBrowser*>(QTextEdit* ptr).

impl DynamicCast<QTextBrowser> for QAbstractScrollArea[src]

unsafe fn dynamic_cast(ptr: Ptr<QAbstractScrollArea>) -> Ptr<QTextBrowser>[src]

Calls C++ function: QTextBrowser* dynamic_cast<QTextBrowser*>(QAbstractScrollArea* ptr).

unsafe fn dynamic_cast_mut(
    ptr: MutPtr<QAbstractScrollArea>
) -> MutPtr<QTextBrowser>
[src]

Calls C++ function: QTextBrowser* dynamic_cast<QTextBrowser*>(QAbstractScrollArea* ptr).

impl DynamicCast<QTextBrowser> for QFrame[src]

unsafe fn dynamic_cast(ptr: Ptr<QFrame>) -> Ptr<QTextBrowser>[src]

Calls C++ function: QTextBrowser* dynamic_cast<QTextBrowser*>(QFrame* ptr).

unsafe fn dynamic_cast_mut(ptr: MutPtr<QFrame>) -> MutPtr<QTextBrowser>[src]

Calls C++ function: QTextBrowser* dynamic_cast<QTextBrowser*>(QFrame* ptr).

impl DynamicCast<QTextBrowser> for QWidget[src]

unsafe fn dynamic_cast(ptr: Ptr<QWidget>) -> Ptr<QTextBrowser>[src]

Calls C++ function: QTextBrowser* dynamic_cast<QTextBrowser*>(QWidget* ptr).

unsafe fn dynamic_cast_mut(ptr: MutPtr<QWidget>) -> MutPtr<QTextBrowser>[src]

Calls C++ function: QTextBrowser* dynamic_cast<QTextBrowser*>(QWidget* ptr).

impl DynamicCast<QTextBrowser> for QObject[src]

unsafe fn dynamic_cast(ptr: Ptr<QObject>) -> Ptr<QTextBrowser>[src]

Calls C++ function: QTextBrowser* dynamic_cast<QTextBrowser*>(QObject* ptr).

unsafe fn dynamic_cast_mut(ptr: MutPtr<QObject>) -> MutPtr<QTextBrowser>[src]

Calls C++ function: QTextBrowser* dynamic_cast<QTextBrowser*>(QObject* ptr).

impl DynamicCast<QTextBrowser> for QPaintDevice[src]

unsafe fn dynamic_cast(ptr: Ptr<QPaintDevice>) -> Ptr<QTextBrowser>[src]

Calls C++ function: QTextBrowser* dynamic_cast<QTextBrowser*>(QPaintDevice* ptr).

unsafe fn dynamic_cast_mut(ptr: MutPtr<QPaintDevice>) -> MutPtr<QTextBrowser>[src]

Calls C++ function: QTextBrowser* dynamic_cast<QTextBrowser*>(QPaintDevice* ptr).

impl StaticDowncast<QTextBrowser> for QTextEdit[src]

unsafe fn static_downcast(ptr: Ptr<QTextEdit>) -> Ptr<QTextBrowser>[src]

Calls C++ function: QTextBrowser* static_cast<QTextBrowser*>(QTextEdit* ptr).

unsafe fn static_downcast_mut(ptr: MutPtr<QTextEdit>) -> MutPtr<QTextBrowser>[src]

Calls C++ function: QTextBrowser* static_cast<QTextBrowser*>(QTextEdit* ptr).

impl StaticDowncast<QTextBrowser> for QAbstractScrollArea[src]

unsafe fn static_downcast(ptr: Ptr<QAbstractScrollArea>) -> Ptr<QTextBrowser>[src]

Calls C++ function: QTextBrowser* static_cast<QTextBrowser*>(QAbstractScrollArea* ptr).

unsafe fn static_downcast_mut(
    ptr: MutPtr<QAbstractScrollArea>
) -> MutPtr<QTextBrowser>
[src]

Calls C++ function: QTextBrowser* static_cast<QTextBrowser*>(QAbstractScrollArea* ptr).

impl StaticDowncast<QTextBrowser> for QFrame[src]

unsafe fn static_downcast(ptr: Ptr<QFrame>) -> Ptr<QTextBrowser>[src]

Calls C++ function: QTextBrowser* static_cast<QTextBrowser*>(QFrame* ptr).

unsafe fn static_downcast_mut(ptr: MutPtr<QFrame>) -> MutPtr<QTextBrowser>[src]

Calls C++ function: QTextBrowser* static_cast<QTextBrowser*>(QFrame* ptr).

impl StaticDowncast<QTextBrowser> for QWidget[src]

unsafe fn static_downcast(ptr: Ptr<QWidget>) -> Ptr<QTextBrowser>[src]

Calls C++ function: QTextBrowser* static_cast<QTextBrowser*>(QWidget* ptr).

unsafe fn static_downcast_mut(ptr: MutPtr<QWidget>) -> MutPtr<QTextBrowser>[src]

Calls C++ function: QTextBrowser* static_cast<QTextBrowser*>(QWidget* ptr).

impl StaticDowncast<QTextBrowser> for QObject[src]

unsafe fn static_downcast(ptr: Ptr<QObject>) -> Ptr<QTextBrowser>[src]

Calls C++ function: QTextBrowser* static_cast<QTextBrowser*>(QObject* ptr).

unsafe fn static_downcast_mut(ptr: MutPtr<QObject>) -> MutPtr<QTextBrowser>[src]

Calls C++ function: QTextBrowser* static_cast<QTextBrowser*>(QObject* ptr).

impl StaticDowncast<QTextBrowser> for QPaintDevice[src]

unsafe fn static_downcast(ptr: Ptr<QPaintDevice>) -> Ptr<QTextBrowser>[src]

Calls C++ function: QTextBrowser* static_cast<QTextBrowser*>(QPaintDevice* ptr).

unsafe fn static_downcast_mut(ptr: MutPtr<QPaintDevice>) -> MutPtr<QTextBrowser>[src]

Calls C++ function: QTextBrowser* static_cast<QTextBrowser*>(QPaintDevice* ptr).

impl StaticUpcast<QAbstractScrollArea> for QTextBrowser[src]

unsafe fn static_upcast(ptr: Ptr<QTextBrowser>) -> Ptr<QAbstractScrollArea>[src]

Calls C++ function: QAbstractScrollArea* static_cast<QAbstractScrollArea*>(QTextBrowser* ptr).

unsafe fn static_upcast_mut(
    ptr: MutPtr<QTextBrowser>
) -> MutPtr<QAbstractScrollArea>
[src]

Calls C++ function: QAbstractScrollArea* static_cast<QAbstractScrollArea*>(QTextBrowser* ptr).

impl StaticUpcast<QFrame> for QTextBrowser[src]

unsafe fn static_upcast(ptr: Ptr<QTextBrowser>) -> Ptr<QFrame>[src]

Calls C++ function: QFrame* static_cast<QFrame*>(QTextBrowser* ptr).

unsafe fn static_upcast_mut(ptr: MutPtr<QTextBrowser>) -> MutPtr<QFrame>[src]

Calls C++ function: QFrame* static_cast<QFrame*>(QTextBrowser* ptr).

impl StaticUpcast<QObject> for QTextBrowser[src]

unsafe fn static_upcast(ptr: Ptr<QTextBrowser>) -> Ptr<QObject>[src]

Calls C++ function: QObject* static_cast<QObject*>(QTextBrowser* ptr).

unsafe fn static_upcast_mut(ptr: MutPtr<QTextBrowser>) -> MutPtr<QObject>[src]

Calls C++ function: QObject* static_cast<QObject*>(QTextBrowser* ptr).

impl StaticUpcast<QPaintDevice> for QTextBrowser[src]

unsafe fn static_upcast(ptr: Ptr<QTextBrowser>) -> Ptr<QPaintDevice>[src]

Calls C++ function: QPaintDevice* static_cast<QPaintDevice*>(QTextBrowser* ptr).

unsafe fn static_upcast_mut(ptr: MutPtr<QTextBrowser>) -> MutPtr<QPaintDevice>[src]

Calls C++ function: QPaintDevice* static_cast<QPaintDevice*>(QTextBrowser* ptr).

impl StaticUpcast<QTextEdit> for QTextBrowser[src]

unsafe fn static_upcast(ptr: Ptr<QTextBrowser>) -> Ptr<QTextEdit>[src]

Calls C++ function: QTextEdit* static_cast<QTextEdit*>(QTextBrowser* ptr).

unsafe fn static_upcast_mut(ptr: MutPtr<QTextBrowser>) -> MutPtr<QTextEdit>[src]

Calls C++ function: QTextEdit* static_cast<QTextEdit*>(QTextBrowser* ptr).

impl StaticUpcast<QWidget> for QTextBrowser[src]

unsafe fn static_upcast(ptr: Ptr<QTextBrowser>) -> Ptr<QWidget>[src]

Calls C++ function: QWidget* static_cast<QWidget*>(QTextBrowser* ptr).

unsafe fn static_upcast_mut(ptr: MutPtr<QTextBrowser>) -> MutPtr<QWidget>[src]

Calls C++ function: QWidget* static_cast<QWidget*>(QTextBrowser* ptr).

Auto Trait Implementations

Blanket Implementations

impl<T> Any for T where
    T: 'static + ?Sized
[src]

impl<T> Borrow<T> for T where
    T: ?Sized
[src]

impl<T> BorrowMut<T> for T where
    T: ?Sized
[src]

impl<T, U> CastInto<U> for T where
    U: CastFrom<T>, 
[src]

impl<T> From<T> for T[src]

impl<T, U> Into<U> for T where
    U: From<T>, 
[src]

impl<T> StaticUpcast<T> for T[src]

impl<T, U> TryFrom<U> for T where
    U: Into<T>, 
[src]

type Error = Infallible

The type returned in the event of a conversion error.

impl<T, U> TryInto<U> for T where
    U: TryFrom<T>, 
[src]

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.