Qt Forum

    • Login
    • Search
    • Categories
    • Recent
    • Tags
    • Popular
    • Users
    • Groups
    • Search
    • Unsolved

    Forum Updated on Feb 6th

    Unsolved Disable spaces in text field?

    General and Desktop
    2
    2
    309
    Loading More Posts
    • 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.
    • L
      Ldweller last edited by

      Hey,
      I have had issues with an e-mail login form - which when I auto fill the word I have a space added onto the end and receive the error "Badly formatted e-mail address".

      Is there a way I can remove the ability to have spaces in that particular text field so this issue wouldn't occur for my users?

      K 1 Reply Last reply Reply Quote 0
      • K
        koahnig @Ldweller last edited by

        @Ldweller

        Hi and welcome to devnet forum

        Different QValidator can help to limit the input possibilities for fields. In particular QRegularExpressionValidator is suitable in your case.

        Vote the answer(s) that helped you to solve your issue(s)

        1 Reply Last reply Reply Quote 5
        • First post
          Last post