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. [SOLVED]QValidator
Forum Updated to NodeBB v4.3 + New Features

[SOLVED]QValidator

Scheduled Pinned Locked Moved General and Desktop
4 Posts 2 Posters 2.4k Views 1 Watching
  • 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.
  • R Offline
    R Offline
    ranger0
    wrote on last edited by
    #1

    I´m trying to implement function fixup() after subclass QValidator, but it´s not working.

    Can anyone help me?

    Code:

    @
    void email::fixup(QString &input) const
    {
    if(input != input.toLower())
    input = input.toLower();
    }
    @

    1 Reply Last reply
    0
    • M Offline
      M Offline
      MichelS
      wrote on last edited by
      #2

      Can you please describe what the expected and the actual behavior is?

      1 Reply Last reply
      0
      • R Offline
        R Offline
        ranger0
        wrote on last edited by
        #3

        Sure!
        I´d expect that if an upper case character is inserted, it should become lower case. But at my QComboBox I can insert upper case characters and nothing happens.

        P.S.: I implemented the validate() function and it works.

        Thanks.

        1 Reply Last reply
        0
        • R Offline
          R Offline
          ranger0
          wrote on last edited by
          #4

          I called fixup function from validate and it works.

          1 Reply Last reply
          0

          • Login

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