Results 1 to 9 of 9

Thread: Display more than four digits/characters

Hybrid View

Previous Post Previous Post   Next Post Next Post
  1. #1
    Join Date
    Mar 2009
    Location
    Brisbane, Australia
    Posts
    7,729
    Thanks
    13
    Thanked 1,610 Times in 1,537 Posts
    Qt products
    Qt4 Qt5
    Platforms
    Unix/X11 Windows
    Wiki edits
    17

    Default Re: Display more than four digits/characters

    Quote Originally Posted by StarRocks View Post
    Thanks for the reply......I want a validation in the button event so that when i click the button it should raise me an error saying please enter the field greater than four digits/characters......Any reply would be appreciable.......Thanks in Advance.......
    And I want a pony... but I have to work for the horse feed. Show the code you have used to try to do these size checks when a button is clicked.

    BTW, your requirements are now:
    • Maximum of 10 characters (from first post)
    • More than 4 characters (from second post)
    • But not 5 characters ??? (from first post)


    Also consider that another solution may be to stop the user from clicking the button unless their input is already valid.

  2. #2
    Join Date
    Jul 2012
    Location
    Hyderabad
    Posts
    82
    Thanks
    5
    Qt products
    Qt3 Qt4 Qt/Embedded
    Platforms
    Unix/X11

    Smile Re: Display more than four digits/characters

    Dear Lanz,


    Thanks for the reply.......Its working fine for me when i give in the button event but a small correction in the syntax
    Qt Code:
    1. its not
    2. lineEdit->text ().length () > 4
    3. rather its
    4. lineEdit->text ().length () < 4
    To copy to clipboard, switch view to plain text mode 

    thats the only difference.......Thanks in Advance.....Hope i guess thats the better way to code......Any ideas would be appreciable.....


    Regards,

  3. #3
    Join Date
    Mar 2009
    Location
    Brisbane, Australia
    Posts
    7,729
    Thanks
    13
    Thanked 1,610 Times in 1,537 Posts
    Qt products
    Qt4 Qt5
    Platforms
    Unix/X11 Windows
    Wiki edits
    17

    Default Re: Display more than four digits/characters

    So now 4 characters is acceptable.

  4. The following user says thank you to ChrisW67 for this useful post:

    StarRocks (2nd February 2013)

  5. #4
    Join Date
    Jul 2012
    Location
    Hyderabad
    Posts
    82
    Thanks
    5
    Qt products
    Qt3 Qt4 Qt/Embedded
    Platforms
    Unix/X11

    Smile Re: Display more than four digits/characters

    Dear Chris,


    Thanks for the reply......It Really worked fine for me............Thanks in Advance


    Regards,

Similar Threads

  1. Unable to display selected unicode characters
    By nickw2066 in forum Qt Programming
    Replies: 0
    Last Post: 19th November 2012, 10:20
  2. QTextEdit not display new line characters
    By aruval3 in forum Qt Programming
    Replies: 2
    Last Post: 30th November 2011, 04:46
  3. Chinese Language display in Nokia showing " ????? " characters
    By behlkush in forum Qt for Embedded and Mobile
    Replies: 2
    Last Post: 25th April 2011, 09:23
  4. Problem with chinese and japanese characters display
    By manojmka in forum Qt for Embedded and Mobile
    Replies: 1
    Last Post: 26th February 2010, 05:09
  5. Problem with korean characters display
    By giriprasad in forum Qt for Embedded and Mobile
    Replies: 1
    Last Post: 27th September 2009, 08:40

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.