Results 1 to 7 of 7

Thread: Help on inputMask

  1. #1
    Join Date
    Apr 2007
    Location
    Sunny Darwin, NT Australia
    Posts
    186
    Thanks
    29
    Thanked 5 Times in 5 Posts
    Qt products
    Qt4
    Platforms
    Unix/X11

    Exclamation Help on inputMask

    I notice the insert key does nothing at runtime for an entry field with an inputMask It's always in overwrite mode. Is this normal ?

  2. #2
    Join Date
    Feb 2006
    Location
    Oslo, Norway
    Posts
    6,264
    Thanks
    36
    Thanked 1,519 Times in 1,389 Posts
    Qt products
    Qt4
    Platforms
    MacOS X Unix/X11 Windows Symbian S60 Maemo/MeeGo

    Default Re: Help on inputMask

    Yes, that's normal. Use validators for validating the input in a different way than the input mask does.
    J-P Nurmi

  3. The following user says thank you to jpn for this useful post:

    vieraci (26th July 2007)

  4. #3
    Join Date
    Apr 2007
    Location
    Sunny Darwin, NT Australia
    Posts
    186
    Thanks
    29
    Thanked 5 Times in 5 Posts
    Qt products
    Qt4
    Platforms
    Unix/X11

    Default Re: Help on inputMask

    Validators don't Format.
    What I want to do is make it more foolproof for users to input data, like capitalize the first character, format phone numbers etc. I wrote some custom formatting and validating classes for Visualage C++, I think I'll have to port the formatting parts to Qt.

  5. #4
    Join Date
    Feb 2006
    Location
    Oslo, Norway
    Posts
    6,264
    Thanks
    36
    Thanked 1,519 Times in 1,389 Posts
    Qt products
    Qt4
    Platforms
    MacOS X Unix/X11 Windows Symbian S60 Maemo/MeeGo

    Default Re: Help on inputMask

    Quote Originally Posted by vieraci View Post
    Validators don't Format.
    Actually, validators can do some little "formatting" too. See QValidator::fixup().
    J-P Nurmi

  6. The following user says thank you to jpn for this useful post:

    vieraci (26th July 2007)

  7. #5
    Join Date
    Apr 2007
    Location
    Sunny Darwin, NT Australia
    Posts
    186
    Thanks
    29
    Thanked 5 Times in 5 Posts
    Qt products
    Qt4
    Platforms
    Unix/X11

    Default Re: Help on inputMask

    After I deleted the inputMask the insert key STILL does nothing.
    and this is normal ??

  8. #6
    Join Date
    Feb 2006
    Location
    Oslo, Norway
    Posts
    6,264
    Thanks
    36
    Thanked 1,519 Times in 1,389 Posts
    Qt products
    Qt4
    Platforms
    MacOS X Unix/X11 Windows Symbian S60 Maemo/MeeGo

    Default Re: Help on inputMask

    Oh, indeed. Seems QLineEdit doesn't have that kind of functionality. I'm Sorry if I mislead you.
    J-P Nurmi

  9. #7
    Join Date
    Apr 2007
    Location
    Sunny Darwin, NT Australia
    Posts
    186
    Thanks
    29
    Thanked 5 Times in 5 Posts
    Qt products
    Qt4
    Platforms
    Unix/X11

    Default Re: Help on inputMask

    Porting my old code is looking like the way to go then. I don't want to, but...

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
Digia, Qt and their respective logos are trademarks of Digia Plc in Finland and/or other countries worldwide.