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. TCP SOCKET

TCP SOCKET

Scheduled Pinned Locked Moved General and Desktop
22 Posts 4 Posters 8.5k 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.
  • G Offline
    G Offline
    great88
    wrote on last edited by
    #21

    Yeah , i would definitely prefer sending the data as QByteArray as is smaller . I will try this out , thanks much .
    [quote author="code_fodder" date="1372073941"]

    This is how I turn a QString (unicode) into a QByteArray (8bit):

    @
    uint16_t* pUtf16 = (uint16_t *) (uncompressedMsg.data());

            // Now move to the source string
            while (*pUtf16++){};
            _source = QString::fromUtf16(pUtf16).toLatin1();
    

    @

    [/quote]

    1 Reply Last reply
    0
    • C Offline
      C Offline
      code_fodder
      wrote on last edited by
      #22

      No problem :)

      Don't forget to add [Solved] to the title once you get it working (and you can post your solution if it differs from what I wrote).

      good luck

      1 Reply Last reply
      0

      • Login

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