Skip to content

Add textInteractionFlags to Text component #237

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 3 commits into from
Jun 22, 2020
Merged

Add textInteractionFlags to Text component #237

merged 3 commits into from
Jun 22, 2020

Conversation

MistahMojo
Copy link
Contributor

@MistahMojo MistahMojo commented Jun 21, 2020

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
Copy link
Collaborator

a7ul commented Jun 22, 2020

@all-contributors add @MistahMojo for code

@a7ul a7ul merged commit 697e145 into nodegui:master Jun 22, 2020
@allcontributors
Copy link
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