<div dir="ltr"><div><div><div><div>Hi,<br><br></div>   I'm trying to convert text from a text field:<br><br>                 TextField {<br>                    id: ekField<br>                    width: 480<br>                    placeholderText: "Kinetic energy [MeV/u]"<br>                    EnterKey.enabled: text.length > 0<br>                    EnterKey.iconSource: "image://theme/icon-m-enter-accept"<br>                    EnterKey.onClicked: focus = false<br>                    //InputMethodHints: Qt.ImhFormattedNumbersOnly<br>                    validator: DoubleValidator {bottom: 0.00001}<br>                 }<br><br></div>to double (property double ekpu)<br><br>             onClicked: {<br>                 # ekpu=double(ekField.text)  # does not work<br></div>                 ekpu=QString(ekField.text).toDouble()<br></div>                 # gives: QString not declared even if there is #include <QString> in main.cpp
<p style="margin:0px;text-indent:0px"><span style="font-family:"Monospace";font-size:9pt;color:rgb(170,0,0)"><br></span><span style="font-family:"Monospace";font-size:9pt;color:rgb(170,0,0)"></span></p><div><div>                 pageStack.push(Qt.resolvedUrl("SecondPage.qml"))<br>             }<br><br><br></div><div>How to do this? Must be trivial, but I googled for a reasonable amount of time and found nothing.<br><br></div><div>Mariusz<br></div></div></div>