Regular expressions
Solved
QML and Qt Quick
-
I am trying to search this string for a " . " and if it is not found I want this button to be enabled. Something like this:
enabled: { var regX = /[.]/g; if(entryDisplay.text.search(regX) === -1) { true } else { false } }
but I can't seem to figure out how to declare this regular expression in QML. The documentation is confusing me I dont see why I would need to use QRegExpValidator class for this and even if I do, for some reason, even though I have imported QtQuick I can't create a QRegExp variable.