Results 1 to 17 of 17

Thread: Searching for a string in QByteArray

Threaded View

Previous Post Previous Post   Next Post Next Post
  1. #17
    Join Date
    Nov 2010
    Posts
    100
    Thanks
    38
    Thanked 1 Time in 1 Post
    Qt products
    Qt3 Qt4

    Default Re: Searching for a string in QByteArray

    This is what i am doing to retrieve data from rs 232 terminal. The data is continues i keep getting the data from the embbeded system.
    Qt Code:
    1. if(port->bytesAvailable())
    2. {
    3. numBytes = port->bytesAvailable();
    4. if(numBytes > sizeof(buff))
    5. numBytes = sizeof(buff);
    6. i = port->read(buff,numBytes);
    7. QByteArray data = (QByteArray::fromRawData(buff,numBytes)).toHex();
    To copy to clipboard, switch view to plain text mode 
    Last edited by nagabathula; 24th November 2010 at 15:58.

Similar Threads

  1. Replies: 4
    Last Post: 19th October 2010, 02:23
  2. Replies: 9
    Last Post: 25th July 2009, 13:27
  3. Searching in a list.
    By kaushal_gaurav in forum Qt Programming
    Replies: 4
    Last Post: 15th October 2008, 08:00
  4. Searching a QTable
    By nategoofs in forum Qt Programming
    Replies: 1
    Last Post: 8th August 2007, 22:15
  5. Convert from QByteArray to String ?
    By probine in forum Newbie
    Replies: 3
    Last Post: 25th March 2006, 15:49

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.