Results 1 to 3 of 3

Thread: [solved] QHostAddress::toSring() backwards?

Threaded View

Previous Post Previous Post   Next Post Next Post
  1. #1
    Join Date
    Jan 2006
    Posts
    44
    Thanks
    9
    Qt products
    Qt4 Qt/Embedded
    Platforms
    MacOS X Unix/X11

    Question [solved] QHostAddress::toSring() backwards?

    This is odd, to me at least.

    I haver an integer that I convert to an IPv4 address using QHostAddress and setAddress(). (I pull the integers from /proc/net/tcp on Linux).

    Yet when I use toString() I get the IP address backwards by octet. For examples: "1.0.0.127" and "21.1.168.192"
    This is not what the docs say I should get (127.0.0.1 and 192.168.1.21, respectively) . Anyone else see this, and of so, how does one (simply) go about getting it output correctly? I could, I suppose, use split() and reverse the list order. But *ugh*, that'd be a hack plain and simple (though that could be said f using QHostAddress to convert an int to an IP address in dotted notation )
    Last edited by ucntcme; 27th November 2007 at 23:58. Reason: solved
    --
    The Real Bill

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.