Hi, I'm trying to convert text from a text field:
TextField { id: ekField width: 480 placeholderText: "Kinetic energy [MeV/u]" EnterKey.enabled: text.length > 0 EnterKey.iconSource: "image://theme/icon-m-enter-accept" EnterKey.onClicked: focus = false //InputMethodHints: Qt.ImhFormattedNumbersOnly validator: DoubleValidator {bottom: 0.00001} } to double (property double ekpu) onClicked: { # ekpu=double(ekField.text) # does not work ekpu=QString(ekField.text).toDouble() # gives: QString not declared even if there is #include <QString> in main.cpp pageStack.push(Qt.resolvedUrl("SecondPage.qml")) } How to do this? Must be trivial, but I googled for a reasonable amount of time and found nothing. Mariusz
_______________________________________________ SailfishOS.org Devel mailing list To unsubscribe, please send a mail to devel-unsubscr...@lists.sailfishos.org