Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • Users
  • Groups
  • Search
  • Get Qt Extensions
  • Unsolved
Collapse
Brand Logo
  1. Home
  2. Qt Development
  3. General and Desktop
  4. TableView InputField live Highlighting (REGEX)

TableView InputField live Highlighting (REGEX)

Scheduled Pinned Locked Moved Unsolved General and Desktop
2 Posts 2 Posters 229 Views
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • N Offline
    N Offline
    NotYourFan
    wrote on last edited by NotYourFan
    #1

    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.

    Example:

    • 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 ?
    JonBJ 1 Reply Last reply
    0
    • N NotYourFan

      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.

      Example:

      • 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 ?
      JonBJ Offline
      JonBJ Offline
      JonB
      wrote on last edited by
      #2

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

      1 Reply Last reply
      2

      • Login

      • Login or register to search.
      • First post
        Last post
      0
      • Categories
      • Recent
      • Tags
      • Popular
      • Users
      • Groups
      • Search
      • Get Qt Extensions
      • Unsolved