Results 1 to 20 of 27

Thread: Ip Address Validation

Hybrid View

Previous Post Previous Post   Next Post Next Post
  1. #1

    Default Re: Ip Address Validation

    But how to combine with setMask("000.000.000.000;")?

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

    Default Re: Ip Address Validation

    You can't. But the validator does almost the same job, especially if you implement its fixup method.

  3. #3
    Join Date
    Dec 2007
    Posts
    119
    Qt products
    Qt3 Qt4
    Platforms
    Windows

    Default Re: Ip Address Validation

    Hi I've the same problem...I've to implement a dialog like WinXp TCP/IP Properties of Network Connections->MyConnection Properties:



    How use IP4Validator with that kind of masks (IP Address and Subnet Mask) and how to implemet them?
    Last edited by fruzzo; 7th May 2008 at 15:41.

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

    Default Re: Ip Address Validation

    You can cheat by having four frameless line edits and three labels grouped in a horizontal layout and with overriden key events to move to the next group when the previous one is filled or when arrow keys are used. That's probably what the mentioned dialog does, too.

  5. #5
    Join Date
    Dec 2007
    Posts
    119
    Qt products
    Qt3 Qt4
    Platforms
    Windows

    Default Re: Ip Address Validation

    Quote Originally Posted by wysota View Post
    You can cheat by having four frameless line edits and three <a href="http://www.ntsearch.com/search.php?q=labels&v=56">labels</a> grouped in a horizontal layout and with overriden key events to move to the next group when the previous one is filled or when arrow keys are used. That's probably what the mentioned dialog does, too.
    Ah ok thanks...that's what I suppose!

    And...about reimplementing the fixup function? what's the idea?

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

    Default Re: Ip Address Validation

    That you can change an invalid entry to a valid entry. For instance decimal point in some countries is the dot character and in others it is comma. Thanks to fixup you can detect a comma instead of a dot (or the other way round) and change it to something you consider valid.

  7. #7
    Join Date
    Dec 2007
    Posts
    119
    Qt products
    Qt3 Qt4
    Platforms
    Windows

    Default Re: Ip Address Validation

    Quote Originally Posted by wysota View Post
    That you can change an invalid entry to a valid entry. For instance decimal point in some countries is the dot character and in others it is comma. Thanks to fixup you can detect a comma instead of a dot (or the other way round) and change it to something you consider valid.

    ah ok thanks...and about fixup to format string like inputmask?

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

    Default Re: Ip Address Validation

    You can do there whatever you like.

Similar Threads

  1. how to read pc's network IP address
    By wei243 in forum Qt Programming
    Replies: 12
    Last Post: 8th January 2010, 17:59
  2. MULTICAST with QT 4.1 and above.
    By jlarsj in forum Qt Programming
    Replies: 7
    Last Post: 10th January 2007, 13:45
  3. How to determine ip address of remote host?
    By nopalot in forum Qt Programming
    Replies: 1
    Last Post: 30th April 2006, 22:18
  4. Problem with mask and validation
    By gunhelstr in forum Qt Programming
    Replies: 1
    Last Post: 19th April 2006, 09:07
  5. Qt 4.1.1 linker warnings
    By Matt Smith in forum Installation and Deployment
    Replies: 0
    Last Post: 26th February 2006, 23:14

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.