[][src]Struct qt_widgets::QTextEdit

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

The QTextEdit class provides a widget that is used to edit and display both plain and rich text.

C++ class: QTextEdit.

C++ documentation:

The QTextEdit class provides a widget that is used to edit and display both plain and rich text.

Methods

impl QTextEdit[src]

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(&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(&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(&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(&self) -> QPtr<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(
    &self,
    position: impl CastInto<Ref<QPoint>>
) -> QPtr<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(&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) -> QPtr<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(&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(
    &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(
    &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(&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(&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(
    &self,
    exp: impl CastInto<Ref<QRegularExpression>>,
    options: QFlags<FindFlag>
) -> bool
[src]

This is supported on cpp_lib_version="5.13.0" or cpp_lib_version="5.14.0" only.

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.

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

This is supported on cpp_lib_version="5.13.0" or cpp_lib_version="5.14.0" only.

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.

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(&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(&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(
    &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(
    &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(&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(&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 from_q_widget(
    parent: impl CastInto<Ptr<QWidget>>
) -> QBox<QTextEdit>
[src]

Constructs an empty QTextEdit with parent parent.

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

C++ documentation:

Constructs an empty QTextEdit with parent parent.

pub unsafe fn from_q_string_q_widget(
    text: impl CastInto<Ref<QString>>,
    parent: impl CastInto<Ptr<QWidget>>
) -> QBox<QTextEdit>
[src]

Constructs a QTextEdit with parent parent. The text edit will display the text text. The text is interpreted as html.

Calls C++ function: [constructor] void QTextEdit::QTextEdit(const QString& text, QWidget* parent = …).

C++ documentation:

Constructs a QTextEdit with parent parent. The text edit will display the text text. The text is interpreted as html.

pub unsafe fn new() -> QBox<QTextEdit>[src]

The QTextEdit class provides a widget that is used to edit and display both plain and rich text.

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

C++ documentation:

The QTextEdit class provides a widget that is used to edit and display both plain and rich text.

pub unsafe fn from_q_string(
    text: impl CastInto<Ref<QString>>
) -> QBox<QTextEdit>
[src]

Constructs a QTextEdit with parent parent. The text edit will display the text text. The text is interpreted as html.

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

C++ documentation:

Constructs a QTextEdit with parent parent. The text edit will display the text text. The text is interpreted as html.

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(&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<Ptr<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(
    &self,
    arg1: Call,
    arg2: c_int,
    arg3: *mut *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(&self, arg1: *const c_char) -> *mut c_void[src]

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

pub unsafe fn redo(&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(&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(&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(&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(&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(&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(
    &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(&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(&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(&self, document: impl CastInto<Ptr<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(&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(
    &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(&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(&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(&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(&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(&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(&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(&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(&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_markdown(&self, markdown: impl CastInto<Ref<QString>>)[src]

This is supported on cpp_lib_version="5.14.0" only.

This property provides a Markdown interface to the text of the text edit.

Calls C++ function: void QTextEdit::setMarkdown(const QString& markdown).

C++ documentation:

This property provides a Markdown interface to the text of the text edit.

toMarkdown() returns the text of the text edit as "pure" Markdown, without any embedded HTML formatting. Some features that QTextDocument supports (such as the use of specific colors and named fonts) cannot be expressed in "pure" Markdown, and they will be omitted.

setMarkdown() 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 Markdown format.

Parsing of HTML included in the markdown string is handled in the same way as in setHtml; however, Markdown formatting inside HTML blocks is not supported.

Some features of the parser can be enabled or disabled via the features argument:

The default is MarkdownDialectGitHub.

Access functions:

QString toMarkdown(QTextDocument::MarkdownFeatures features = QTextDocument::MarkdownDialectGitHub) const
void setMarkdown(const QString &markdown)

Notifier signal:

void textChanged()

See also plainText, html, QTextDocument::toMarkdown(), and QTextDocument::setMarkdown().

pub unsafe fn set_overwrite_mode(&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(
    &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(&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(&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(&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(&self, distance: c_double)[src]

This is supported on cpp_lib_version="5.11.3" or cpp_lib_version="5.12.2" or cpp_lib_version="5.13.0" or cpp_lib_version="5.14.0" only.

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)

pub unsafe fn set_tab_stop_width(&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(&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(&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(&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(&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(
    &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(&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(&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 static_meta_object() -> Ref<QMetaObject>[src]

Returns a reference to the staticMetaObject field.

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 is supported on cpp_lib_version="5.11.3" or cpp_lib_version="5.12.2" or cpp_lib_version="5.13.0" or cpp_lib_version="5.14.0" only.

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)

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_markdown_1a(
    &self,
    features: QFlags<MarkdownFeature>
) -> CppBox<QString>
[src]

This is supported on cpp_lib_version="5.14.0" only.

This property provides a Markdown interface to the text of the text edit.

Calls C++ function: QString QTextEdit::toMarkdown(QFlags<QTextDocument::MarkdownFeature> features = …) const.

C++ documentation:

This property provides a Markdown interface to the text of the text edit.

toMarkdown() returns the text of the text edit as "pure" Markdown, without any embedded HTML formatting. Some features that QTextDocument supports (such as the use of specific colors and named fonts) cannot be expressed in "pure" Markdown, and they will be omitted.

setMarkdown() 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 Markdown format.

Parsing of HTML included in the markdown string is handled in the same way as in setHtml; however, Markdown formatting inside HTML blocks is not supported.

Some features of the parser can be enabled or disabled via the features argument:

The default is MarkdownDialectGitHub.

Access functions:

QString toMarkdown(QTextDocument::MarkdownFeatures features = QTextDocument::MarkdownDialectGitHub) const
void setMarkdown(const QString &markdown)

Notifier signal:

void textChanged()

See also plainText, html, QTextDocument::toMarkdown(), and QTextDocument::setMarkdown().

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

This is supported on cpp_lib_version="5.14.0" only.

This property provides a Markdown interface to the text of the text edit.

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

C++ documentation:

This property provides a Markdown interface to the text of the text edit.

toMarkdown() returns the text of the text edit as "pure" Markdown, without any embedded HTML formatting. Some features that QTextDocument supports (such as the use of specific colors and named fonts) cannot be expressed in "pure" Markdown, and they will be omitted.

setMarkdown() 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 Markdown format.

Parsing of HTML included in the markdown string is handled in the same way as in setHtml; however, Markdown formatting inside HTML blocks is not supported.

Some features of the parser can be enabled or disabled via the features argument:

The default is MarkdownDialectGitHub.

Access functions:

QString toMarkdown(QTextDocument::MarkdownFeatures features = QTextDocument::MarkdownDialectGitHub) const
void setMarkdown(const QString &markdown)

Notifier signal:

void textChanged()

See also plainText, html, QTextDocument::toMarkdown(), and QTextDocument::setMarkdown().

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 tr(
    s: *const c_char,
    c: *const c_char,
    n: c_int
) -> CppBox<QString>
[src]

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

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

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

pub unsafe fn undo(&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(&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(&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(&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(&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().

Methods from Deref<Target = QAbstractScrollArea>

pub unsafe fn add_scroll_bar_widget(
    &self,
    widget: impl CastInto<Ptr<QWidget>>,
    alignment: QFlags<AlignmentFlag>
)
[src]

Adds widget as a scroll bar widget in the location specified by alignment.

Calls C++ function: void QAbstractScrollArea::addScrollBarWidget(QWidget* widget, QFlags<Qt::AlignmentFlag> alignment).

C++ documentation:

Adds widget as a scroll bar widget in the location specified by alignment.

Scroll bar widgets are shown next to the horizontal or vertical scroll bar, and can be placed on either side of it. If you want the scroll bar widgets to be always visible, set the scrollBarPolicy for the corresponding scroll bar to AlwaysOn.

alignment must be one of Qt::Alignleft and Qt::AlignRight, which maps to the horizontal scroll bar, or Qt::AlignTop and Qt::AlignBottom, which maps to the vertical scroll bar.

A scroll bar widget can be removed by either re-parenting the widget or deleting it. It's also possible to hide a widget with QWidget::hide()

The scroll bar widget will be resized to fit the scroll bar geometry for the current style. The following describes the case for scroll bar widgets on the horizontal scroll bar:

The height of the widget will be set to match the height of the scroll bar. To control the width of the widget, use QWidget::setMinimumWidth and QWidget::setMaximumWidth, or implement QWidget::sizeHint() and set a horizontal size policy. If you want a square widget, call QStyle::pixelMetric(QStyle::PM_ScrollBarExtent) and set the width to this value.

This function was introduced in Qt 4.2.

See also scrollBarWidgets().

pub unsafe fn corner_widget(&self) -> QPtr<QWidget>[src]

Returns the widget in the corner between the two scroll bars.

Calls C++ function: QWidget* QAbstractScrollArea::cornerWidget() const.

C++ documentation:

Returns the widget in the corner between the two scroll bars.

By default, no corner widget is present.

This function was introduced in Qt 4.2.

See also setCornerWidget().

pub unsafe fn horizontal_scroll_bar(&self) -> QPtr<QScrollBar>[src]

Returns the horizontal scroll bar.

Calls C++ function: QScrollBar* QAbstractScrollArea::horizontalScrollBar() const.

C++ documentation:

Returns the horizontal scroll bar.

See also setHorizontalScrollBar(), horizontalScrollBarPolicy, and verticalScrollBar().

pub unsafe fn horizontal_scroll_bar_policy(&self) -> ScrollBarPolicy[src]

This property holds the policy for the horizontal scroll bar

Calls C++ function: Qt::ScrollBarPolicy QAbstractScrollArea::horizontalScrollBarPolicy() const.

C++ documentation:

This property holds the policy for the horizontal scroll bar

The default policy is Qt::ScrollBarAsNeeded.

Access functions:

Qt::ScrollBarPolicy horizontalScrollBarPolicy() const
void setHorizontalScrollBarPolicy(Qt::ScrollBarPolicy)

See also verticalScrollBarPolicy.

pub unsafe fn maximum_viewport_size(&self) -> CppBox<QSize>[src]

Returns the size of the viewport as if the scroll bars had no valid scrolling range.

Calls C++ function: QSize QAbstractScrollArea::maximumViewportSize() const.

C++ documentation:

Returns the size of the viewport as if the scroll bars had no valid scrolling range.

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

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

pub unsafe fn minimum_size_hint(&self) -> CppBox<QSize>[src]

Reimplemented from QWidget::minimumSizeHint().

Calls C++ function: virtual QSize QAbstractScrollArea::minimumSizeHint() const.

C++ documentation:

Reimplemented from QWidget::minimumSizeHint().

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

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

pub unsafe fn qt_metacast(&self, arg1: *const c_char) -> *mut c_void[src]

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

pub unsafe fn scroll_bar_widgets(
    &self,
    alignment: QFlags<AlignmentFlag>
) -> CppBox<QListOfQWidget>
[src]

Returns a list of the currently set scroll bar widgets. alignment can be any combination of the four location flags.

Calls C++ function: QList<QWidget*> QAbstractScrollArea::scrollBarWidgets(QFlags<Qt::AlignmentFlag> alignment).

C++ documentation:

Returns a list of the currently set scroll bar widgets. alignment can be any combination of the four location flags.

This function was introduced in Qt 4.2.

See also addScrollBarWidget().

pub unsafe fn set_corner_widget(&self, widget: impl CastInto<Ptr<QWidget>>)[src]

Sets the widget in the corner between the two scroll bars to be widget.

Calls C++ function: void QAbstractScrollArea::setCornerWidget(QWidget* widget).

C++ documentation:

Sets the widget in the corner between the two scroll bars to be widget.

You will probably also want to set at least one of the scroll bar modes to AlwaysOn.

Passing 0 shows no widget in the corner.

Any previous corner widget is hidden.

You may call setCornerWidget() with the same widget at different times.

All widgets set here will be deleted by the scroll area when it is destroyed unless you separately reparent the widget after setting some other corner widget (or 0).

Any newly set widget should have no current parent.

By default, no corner widget is present.

This function was introduced in Qt 4.2.

See also cornerWidget(), horizontalScrollBarPolicy, and horizontalScrollBarPolicy.

pub unsafe fn set_horizontal_scroll_bar(
    &self,
    scrollbar: impl CastInto<Ptr<QScrollBar>>
)
[src]

Replaces the existing horizontal scroll bar with scrollBar, and sets all the former scroll bar's slider properties on the new scroll bar. The former scroll bar is then deleted.

Calls C++ function: void QAbstractScrollArea::setHorizontalScrollBar(QScrollBar* scrollbar).

C++ documentation:

Replaces the existing horizontal scroll bar with scrollBar, and sets all the former scroll bar's slider properties on the new scroll bar. The former scroll bar is then deleted.

QAbstractScrollArea already provides horizontal and vertical scroll bars by default. You can call this function to replace the default horizontal scroll bar with your own custom scroll bar.

This function was introduced in Qt 4.2.

See also horizontalScrollBar() and setVerticalScrollBar().

pub unsafe fn set_horizontal_scroll_bar_policy(&self, arg1: ScrollBarPolicy)[src]

This property holds the policy for the horizontal scroll bar

Calls C++ function: void QAbstractScrollArea::setHorizontalScrollBarPolicy(Qt::ScrollBarPolicy arg1).

C++ documentation:

This property holds the policy for the horizontal scroll bar

The default policy is Qt::ScrollBarAsNeeded.

Access functions:

Qt::ScrollBarPolicy horizontalScrollBarPolicy() const
void setHorizontalScrollBarPolicy(Qt::ScrollBarPolicy)

See also verticalScrollBarPolicy.

pub unsafe fn set_size_adjust_policy(&self, policy: SizeAdjustPolicy)[src]

This property holds the policy describing how the size of the scroll area changes when the size of the viewport changes.

Calls C++ function: void QAbstractScrollArea::setSizeAdjustPolicy(QAbstractScrollArea::SizeAdjustPolicy policy).

C++ documentation:

This property holds the policy describing how the size of the scroll area changes when the size of the viewport changes.

The default policy is QAbstractScrollArea::AdjustIgnored. Changing this property might actually resize the scrollarea.

This property was introduced in Qt 5.2.

Access functions:

SizeAdjustPolicy sizeAdjustPolicy() const
void setSizeAdjustPolicy(SizeAdjustPolicy policy)

pub unsafe fn set_vertical_scroll_bar(
    &self,
    scrollbar: impl CastInto<Ptr<QScrollBar>>
)
[src]

Replaces the existing vertical scroll bar with scrollBar, and sets all the former scroll bar's slider properties on the new scroll bar. The former scroll bar is then deleted.

Calls C++ function: void QAbstractScrollArea::setVerticalScrollBar(QScrollBar* scrollbar).

C++ documentation:

Replaces the existing vertical scroll bar with scrollBar, and sets all the former scroll bar's slider properties on the new scroll bar. The former scroll bar is then deleted.

QAbstractScrollArea already provides vertical and horizontal scroll bars by default. You can call this function to replace the default vertical scroll bar with your own custom scroll bar.

This function was introduced in Qt 4.2.

See also verticalScrollBar() and setHorizontalScrollBar().

pub unsafe fn set_vertical_scroll_bar_policy(&self, arg1: ScrollBarPolicy)[src]

This property holds the policy for the vertical scroll bar

Calls C++ function: void QAbstractScrollArea::setVerticalScrollBarPolicy(Qt::ScrollBarPolicy arg1).

C++ documentation:

This property holds the policy for the vertical scroll bar

The default policy is Qt::ScrollBarAsNeeded.

Access functions:

Qt::ScrollBarPolicy verticalScrollBarPolicy() const
void setVerticalScrollBarPolicy(Qt::ScrollBarPolicy)

See also horizontalScrollBarPolicy.

pub unsafe fn set_viewport(&self, widget: impl CastInto<Ptr<QWidget>>)[src]

Sets the viewport to be the given widget. The QAbstractScrollArea will take ownership of the given widget.

Calls C++ function: void QAbstractScrollArea::setViewport(QWidget* widget).

C++ documentation:

Sets the viewport to be the given widget. The QAbstractScrollArea will take ownership of the given widget.

If widget is 0, QAbstractScrollArea will assign a new QWidget instance for the viewport.

This function was introduced in Qt 4.2.

See also viewport().

pub unsafe fn setup_viewport(&self, viewport: impl CastInto<Ptr<QWidget>>)[src]

This slot is called by QAbstractScrollArea after setViewport(viewport) has been called. Reimplement this function in a subclass of QAbstractScrollArea to initialize the new viewport before it is used.

Calls C++ function: virtual void QAbstractScrollArea::setupViewport(QWidget* viewport).

C++ documentation:

This slot is called by QAbstractScrollArea after setViewport(viewport) has been called. Reimplement this function in a subclass of QAbstractScrollArea to initialize the new viewport before it is used.

See also setViewport().

pub unsafe fn size_adjust_policy(&self) -> SizeAdjustPolicy[src]

This property holds the policy describing how the size of the scroll area changes when the size of the viewport changes.

Calls C++ function: QAbstractScrollArea::SizeAdjustPolicy QAbstractScrollArea::sizeAdjustPolicy() const.

C++ documentation:

This property holds the policy describing how the size of the scroll area changes when the size of the viewport changes.

The default policy is QAbstractScrollArea::AdjustIgnored. Changing this property might actually resize the scrollarea.

This property was introduced in Qt 5.2.

Access functions:

SizeAdjustPolicy sizeAdjustPolicy() const
void setSizeAdjustPolicy(SizeAdjustPolicy policy)

pub unsafe fn size_hint(&self) -> CppBox<QSize>[src]

Reimplemented from QWidget::sizeHint().

Calls C++ function: virtual QSize QAbstractScrollArea::sizeHint() const.

C++ documentation:

Reimplemented from QWidget::sizeHint().

Returns the sizeHint property of the scroll area. The size is determined by using viewportSizeHint() plus some extra space for scroll bars, if needed.

pub unsafe fn vertical_scroll_bar(&self) -> QPtr<QScrollBar>[src]

Returns the vertical scroll bar.

Calls C++ function: QScrollBar* QAbstractScrollArea::verticalScrollBar() const.

C++ documentation:

Returns the vertical scroll bar.

See also setVerticalScrollBar(), verticalScrollBarPolicy, and horizontalScrollBar().

pub unsafe fn vertical_scroll_bar_policy(&self) -> ScrollBarPolicy[src]

This property holds the policy for the vertical scroll bar

Calls C++ function: Qt::ScrollBarPolicy QAbstractScrollArea::verticalScrollBarPolicy() const.

C++ documentation:

This property holds the policy for the vertical scroll bar

The default policy is Qt::ScrollBarAsNeeded.

Access functions:

Qt::ScrollBarPolicy verticalScrollBarPolicy() const
void setVerticalScrollBarPolicy(Qt::ScrollBarPolicy)

See also horizontalScrollBarPolicy.

pub unsafe fn viewport(&self) -> QPtr<QWidget>[src]

Returns the viewport widget.

Calls C++ function: QWidget* QAbstractScrollArea::viewport() const.

C++ documentation:

Returns the viewport widget.

Use the QScrollArea::widget() function to retrieve the contents of the viewport widget.

See also setViewport() and QScrollArea::widget().

Trait Implementations

impl CppDeletable for QTextEdit[src]

unsafe fn delete(&self)[src]

Destructor.

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

C++ documentation:

Destructor.

impl Deref for QTextEdit[src]

type Target = QAbstractScrollArea

The resulting type after dereferencing.

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

Calls C++ function: QAbstractScrollArea* static_cast<QAbstractScrollArea*>(QTextEdit* 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).

impl DynamicCast<QTextEdit> for QAbstractScrollArea[src]

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

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

impl DynamicCast<QTextEdit> for QFrame[src]

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

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

impl DynamicCast<QTextEdit> for QWidget[src]

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

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

impl DynamicCast<QTextEdit> for QObject[src]

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

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

impl DynamicCast<QTextEdit> for QPaintDevice[src]

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

Calls C++ function: QTextEdit* dynamic_cast<QTextEdit*>(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).

impl StaticDowncast<QTextEdit> for QAbstractScrollArea[src]

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

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

impl StaticDowncast<QTextEdit> for QFrame[src]

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

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

impl StaticDowncast<QTextEdit> for QWidget[src]

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

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

impl StaticDowncast<QTextEdit> for QObject[src]

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

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

impl StaticDowncast<QTextEdit> for QPaintDevice[src]

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

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

impl StaticUpcast<QAbstractScrollArea> for QTextEdit[src]

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

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

impl StaticUpcast<QFrame> for QTextEdit[src]

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

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

impl StaticUpcast<QObject> for QTextEdit[src]

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

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

impl StaticUpcast<QPaintDevice> for QTextEdit[src]

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

Calls C++ function: QPaintDevice* static_cast<QPaintDevice*>(QTextEdit* 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).

impl StaticUpcast<QWidget> for QTextEdit[src]

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

Calls C++ function: QWidget* static_cast<QWidget*>(QTextEdit* 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.