Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • Users
  • Groups
  • Search
  • Get Qt Extensions
  • Unsolved
Collapse
Brand Logo
  1. Home
  2. Qt Development
  3. General and Desktop
  4. Convert ipAddres to bytes
Forum Updated to NodeBB v4.3 + New Features

Convert ipAddres to bytes

Scheduled Pinned Locked Moved Solved General and Desktop
2 Posts 2 Posters 157 Views
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • D Offline
    D Offline
    Damian7546
    wrote on last edited by
    #1

    Hi,
    I have parametr in function with ip addres :
    QByteArray = "192.168.1.44"
    How convert above addres to QByteArray with items:
    192
    168
    1
    44
    ?

    JonBJ 1 Reply Last reply
    0
    • D Damian7546

      Hi,
      I have parametr in function with ip addres :
      QByteArray = "192.168.1.44"
      How convert above addres to QByteArray with items:
      192
      168
      1
      44
      ?

      JonBJ Online
      JonBJ Online
      JonB
      wrote on last edited by
      #2

      @Damian7546
      QList<QByteArray> QByteArray::split(char sep) const with . as splitter. You might alternatively convert to a QString, pass it to QUrl and use its methods to parse the IP address into segments for you.

      1 Reply Last reply
      2
      • D Damian7546 has marked this topic as solved on

      • Login

      • Login or register to search.
      • First post
        Last post
      0
      • Categories
      • Recent
      • Tags
      • Popular
      • Users
      • Groups
      • Search
      • Get Qt Extensions
      • Unsolved