Results 1 to 8 of 8

Thread: Struct in network

Threaded View

Previous Post Previous Post   Next Post Next Post
  1. #1
    Join Date
    Mar 2008
    Posts
    4
    Qt products
    Qt4
    Platforms
    Unix/X11

    Question Struct in network

    Hi ,
    Can anyone please tell me how to pass a struct thru a QTcpSocket!
    the struct is like this for eg
    Qt Code:
    1. struct sname
    2. {
    3. qint16 q;
    4. }
    To copy to clipboard, switch view to plain text mode 

    the tcpsocket->write method accepts only qbytearray as the data to send. so can u please tell me how to convert a struct into a qbytearray or
    is there anyother method to send this data to the server.
    i use QT4.2.2 in linux kernel version 2.6
    --
    thnks ..
    Last edited by jpn; 24th March 2008 at 11:43. Reason: missing [code] tags

Similar Threads

  1. Replies: 16
    Last Post: 23rd May 2008, 11:12
  2. Checking network availability
    By fullmetalcoder in forum Qt Programming
    Replies: 2
    Last Post: 10th March 2008, 20:23
  3. Make error with Qt Jambi 4.3.2_01
    By pamalite in forum Installation and Deployment
    Replies: 0
    Last Post: 22nd November 2007, 13:05
  4. QSocket - signal for network wire disconnection
    By manivannan_1984 in forum Qt Programming
    Replies: 7
    Last Post: 5th September 2006, 14:52
  5. memset struct with QString elements
    By Timewarp in forum Qt Programming
    Replies: 2
    Last Post: 5th February 2006, 02:48

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.