Skip to content
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

Add textInteractionFlags to Text component #237

Merged
merged 3 commits into from Jun 22, 2020
Merged

Conversation

@MistahMojo
Copy link
Contributor

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
a7ul approved these changes Jun 22, 2020
@a7ul
Copy link
Collaborator

a7ul commented Jun 22, 2020

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

allcontributors bot commented Jun 22, 2020

@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
Projects
None yet
Linked issues

Successfully merging this pull request may close these issues.

None yet

2 participants
You can’t perform that action at this time.