Qt World Summit: Register Today!

TableView InputField live Highlighting (REGEX)

  • Hey,

    i have a tableView with setData, data etc.
    The InputField with data and setData works fine and perfect.

    Now I want to make a "live Highlighting" thoughts with regex.


    • My regex accepted only numbers
    • The InputField has a red background color (because its not filled)

    now I want to:

    • if I input the first number (9) --> green background
    • If I Input a Number an then a letter (9a) --> when I input 9 --> green background --> after input a --> red background
      so I want a live highlighting ... do you have any ideas ?

  • @NotYourFan
    Combine signal from your "InputField" as user types (e.g. textChanged) with QValidator which has states Invalid/Intermediate/Acceptable?

Log in to reply