Hi
I would like to create simple edit form for text and double values.

For text field I'm using RegExpValidator:
Qt Code:
  1. TextField {
  2. id: itemNazwa
  3. width: 200
  4. height: 20
  5. focus: true
  6. maximumLength: 30
  7. validator: RegExpValidator { regExp: /[0-9a-fA-F\s]{1,30}/; }
  8. }
To copy to clipboard, switch view to plain text mode 

and for double value I'm using DoubleValidator:
Qt Code:
  1. TextField {
  2. id: itemCenaNetto
  3. width: 200
  4. height: 20
  5. text: qsTr("---")
  6. validator: DoubleValidator { bottom: 0; top: 1e10; decimals: 2; }
  7. }
To copy to clipboard, switch view to plain text mode 

What I found out is that validator is working only when text field is empty and user starts to input some text. If there is already some text in text input field validators are not working, user is able to input any values into text field.

I would like to set current values on form load and allow user to edit those values in validated fields. How to correctly implement input form with validation?