Solved How to divide QString?
-
Hi all,
I have a text in qml which I copied below. I want to divide one text into 2 or more and assign it to another text. In onSomeSignal scope, I want to divide the sentence. For example I dont need whole sentence only need "apple"How can I do that?Text { id: first } Connections { id:connection target:controller ignoreUnknownSignals: true onSomeSignal: { first.text = (I need here only "apple" of second text) } } Text { id: second text: qsTr("apple fruit vegetable") }
-
@Yunus If you want to do it in QML,
have a look at the JS- String operations that are available for you
https://www.w3schools.com/jsref/jsref_obj_string.aspThat should include all tools you need for that task.
-
@J-Hilk Ahh. okey thats what I m looking for. Ty.