You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I am trying to get the selected text from a PlainTextEdit component
The snippet that I though of was
exportconstTextPart=()=>{consttextViewRef=createRef<QPlainTextEdit>(null);useEffect(()=>{textViewRef.current.addEventListener("selectionChanged",()=>{// How I should retrieve the selected text?textViewRef.current?.setPlainText("Hello World!");});return()=>textViewRef.current.removeEventListener("selectionChanged");},[textViewRef.current]);return(<Viewstyle="margin: 30px;"><Text>Thisisthecoolpart</Text><PlainTextEditref={textViewRef}/></View>);};
Which I though could help, but I don't think that the ref is giving me access to a @nodegui element.
How I could access the QPlainTextEdit element? Or how does the react wrapping works?
The text was updated successfully, but these errors were encountered:
I am trying to get the selected text from a PlainTextEdit component
The snippet that I though of was
Which I though could help, but I don't think that the ref is giving me access to a @nodegui element.
How I could access the QPlainTextEdit element? Or how does the react wrapping works?
The text was updated successfully, but these errors were encountered: