Results 1 to 11 of 11

Thread: input mask problem

Hybrid View

Previous Post Previous Post   Next Post Next Post
  1. #1
    Join Date
    Jan 2006
    Location
    Warsaw, Poland
    Posts
    33,368
    Thanks
    3
    Thanked 5,018 Times in 4,794 Posts
    Qt products
    Qt3 Qt4 Qt5 Qt/Embedded
    Platforms
    Unix/X11 Windows Android Maemo/MeeGo
    Wiki edits
    10

    Default Re: input mask problem

    "10: ", as expected.
    Your biological and technological distinctiveness will be added to our own. Resistance is futile.

    Please ask Qt related questions on the forum and not using private messages or visitor messages.


  2. #2
    Join Date
    Dec 2008
    Location
    Istanbul, TURKEY
    Posts
    537
    Thanks
    14
    Thanked 13 Times in 13 Posts
    Qt products
    Qt4
    Platforms
    Windows Android

    Default Re: input mask problem

    I guess I'm missing some point.
    Cuz it worked for me too.

    Thanks for your replies.

  3. #3
    Join Date
    Jan 2006
    Location
    Warsaw, Poland
    Posts
    33,368
    Thanks
    3
    Thanked 5,018 Times in 4,794 Posts
    Qt products
    Qt3 Qt4 Qt5 Qt/Embedded
    Platforms
    Unix/X11 Windows Android Maemo/MeeGo
    Wiki edits
    10

    Default Re: input mask problem

    If you want the zeroes to be appended automatically, change the input mask to: "99:99;0"
    Your biological and technological distinctiveness will be added to our own. Resistance is futile.

    Please ask Qt related questions on the forum and not using private messages or visitor messages.


  4. #4
    Join Date
    Dec 2008
    Location
    Istanbul, TURKEY
    Posts
    537
    Thanks
    14
    Thanked 13 Times in 13 Posts
    Qt products
    Qt4
    Platforms
    Windows Android

    Default Re: input mask problem

    Hi,

    problem solved! thanks.

    But I have another problem now. You know if the inputMask does not fit what you wrote in the lineedit, editingFinished() signal does not work. So when you focus out from the lineedit with the cursor and still the inputMask does not fit with the text in lineedit, although you lost the focus in that lineedit editingFinish() signal isn't emitted!

    I wrote a method that takes the string in lineedit and make it fit with inputMask visually when the lineedit loses the focus by the cursor , but unfortunately I'am not able to emit edittingFinish() signal. Is there a way to perform this?

  5. #5
    Join Date
    Jan 2006
    Location
    Warsaw, Poland
    Posts
    33,368
    Thanks
    3
    Thanked 5,018 Times in 4,794 Posts
    Qt products
    Qt3 Qt4 Qt5 Qt/Embedded
    Platforms
    Unix/X11 Windows Android Maemo/MeeGo
    Wiki edits
    10

    Default Re: input mask problem

    Apply a validator (subclass of QValidator) on the widget and make sure its fixup() method is implemented correctly. This should do the trick.
    Your biological and technological distinctiveness will be added to our own. Resistance is futile.

    Please ask Qt related questions on the forum and not using private messages or visitor messages.


Similar Threads

  1. QLineEdit and input mask
    By tpf80 in forum Qt Programming
    Replies: 7
    Last Post: 9th May 2014, 19:47
  2. Tiny problem with input mask.
    By RSX in forum Qt Programming
    Replies: 3
    Last Post: 4th April 2009, 18:05
  3. Mixing QRegExpValidator and input mask and QLineEdit
    By abernat in forum Qt Programming
    Replies: 1
    Last Post: 18th February 2009, 00:04
  4. problem with reading input data in qt
    By Ahmad in forum Qt Programming
    Replies: 3
    Last Post: 9th April 2007, 10:58
  5. Problem with mask and validation
    By gunhelstr in forum Qt Programming
    Replies: 1
    Last Post: 19th April 2006, 08:07

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
  •  
Qt is a trademark of The Qt Company.