Qml srting to QString
-
I am getting an empty string when I try to send qml text, withMyclass.write("some text") this works
Q_INVOKABLE void write(QString text) { // } Text { id: myText text: fronthell } MouseArea { id: ma Myclass.write(myText.text) }
-
@JobRecrd said in Qml srting to QString:
Myclass.write(fronthell.text)
should be
MouseArea { id: ma onClicked : { Myclass.write(myText.text) } }
-
@LeLev Sorry,
Sorry, I made a mistake in the post, it says myText.text and it doesn't work for some reason.