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
Forum Updated to NodeBB v4.3 + New Features

TCP SOCKET

Scheduled Pinned Locked Moved General and Desktop
22 Posts 4 Posters 8.9k Views 1 Watching
  • 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 25 Jun 2013, 03:50 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 26 Jun 2013, 09:30 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

      21/22

      25 Jun 2013, 03:50

      • Login

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