Skip to content

Add textInteractionFlags to Text component#237

Merged
a7ul merged 3 commits into
nodegui:masterfrom
MistahMojo:master
Jun 22, 2020
Merged

Add textInteractionFlags to Text component#237
a7ul merged 3 commits into
nodegui:masterfrom
MistahMojo:master

Conversation

@MistahMojo

@MistahMojo MistahMojo commented Jun 21, 2020

Copy link
Copy Markdown
Contributor

The text interaction flag can now be given as a prop to the Text component.

As per issue #236.

Example usage:
<Text textInteractionFlags={1}>You Can Select Me!</Text>

Where 1 is from the Qt TextInteractionFlags enum: https://doc.qt.io/qt-5/qt.html#TextInteractionFlag-enum

Includes support for multiple flags using an | comparison, e.g. textInteractionFlags={1|2}

From testing: no16, TextEditable, does not appear to produce editable text as the Qt docs would indicate. However, this result can be achieved using a PlainTextEdit component if this functionality is really needed.

Docs are updated too.

@a7ul

a7ul commented Jun 22, 2020

Copy link
Copy Markdown
Collaborator

@all-contributors add @MistahMojo for code

@a7ul a7ul merged commit 697e145 into nodegui:master Jun 22, 2020
@allcontributors

Copy link
Copy Markdown
Contributor

@a7ul

I've put up a pull request to add @MistahMojo! 🎉

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants