"textInteractionFlags"

Defines how the TextEdit widget reacts to user inputs.

Synopsis

shape.textInteractionFlags(float limit);

Parameters

Parameter Description
flag
  • NoTextInteraction - no interaction with the text is possible

  • TextSelectableByMouse - the text can be selected via mouse and copied via context menu or keyboard shortcuts.

  • TextSelectableByKeyboard - the text can be selected via cursor keys

  • LinksAccessibleByMouse - hyperlinks can be highlighted and opened via mouse

  • LinksAccessibleByKeyboard - hyperlinks can be focused with tab and opened via enter

  • TextEditable - text is fully editable

  • TextEditorInteraction - default for a text editor, which corresponds to the combination TextSelectableByMouse | TextSelectableByKeyboard | TextEditable

  • TextBrowserInteraction - default for a Qtext browser, corresponds to the combination TextSelectableByMouse | LinksAccessibleByMouse | LinksAccessibleByKeyboard

Description

Defines how the TextEdit widget reacts to user inputs.

Example

In the following example the text can be selected and copied via mouse.

main()
{
  TEXT_EDIT1.textInteractionFlags("TextSelectableByMouse");
}

Assignment

TextEdit