I am writing an application with a submit button but I want to check if the textfield has been filled if not do not submit.
Not quite sure how the code should go.
My code currently looks like
if(flightNumber == NULL)
{
flightNumbertext.text.color = 'red';
}
I am designing this for a Qt Quick application written in QML.
After a bit of playing, I think this will work for you
The function trim() is like QString::trimmed(). It removes both leading and trailing spaces from the
string.