Results 1 to 3 of 3

Thread: i want use tcpsocket send a uchar data,, but there is no function conversion uchar to

Threaded View

Previous Post Previous Post   Next Post Next Post
  1. #1
    Join Date
    Apr 2009
    Posts
    35
    Thanks
    9
    Qt products
    Qt3 Qt4 Qt5 Qt/Embedded
    Platforms
    MacOS X Unix/X11 Android

    Default i want use tcpsocket send a uchar data,, but there is no function conversion uchar to

    i want use tcpsocket send a uchar data,, but there is no function conversion uchar to QByteArray

    how can i use qtcpsocket send const unsigned char* src data ?

    conversion to
    QByteArray ?
    QChar ?

    Qt Code:
    1. this->m_tcpSocket = new QTcpSocket(this);
    2. this->tcpSocket->connectToHost("192.168.0.111",8888);
    3. connect(this->tcpSocket,SIGNAL(connected()),this,(sendData()));
    4.  
    5. sendData function
    6.  
    7. {
    8. const unsigned char* src = some unsigned char data
    9.  
    10. this->tcpSocket->write(?,size) ?
    11.  
    12.  
    13. }
    To copy to clipboard, switch view to plain text mode 
    Last edited by wysota; 5th November 2010 at 16:40.

Similar Threads

  1. duplicate data on TCPSocket
    By daemonna in forum Qt Programming
    Replies: 9
    Last Post: 4th August 2010, 06:29
  2. Problem with receiving Data from TcpSocket
    By Basti300 in forum Qt Programming
    Replies: 0
    Last Post: 15th July 2010, 14:41
  3. problem in data type conversion
    By sksingh73 in forum Newbie
    Replies: 2
    Last Post: 24th June 2010, 02:12
  4. Replies: 4
    Last Post: 8th January 2008, 18:41
  5. Creating a QImage from uchar* data
    By forrestfsu in forum Qt Programming
    Replies: 6
    Last Post: 8th February 2007, 15:21

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
  •  
Digia, Qt and their respective logos are trademarks of Digia Plc in Finland and/or other countries worldwide.