Results 1 to 20 of 20

Thread: Checking QByteArray for certain values

Threaded View

Previous Post Previous Post   Next Post Next Post
  1. #9
    Join Date
    Sep 2011
    Location
    Manchester
    Posts
    538
    Qt products
    Qt4 Qt/Embedded
    Platforms
    MacOS X Unix/X11 Windows
    Thanks
    3
    Thanked 106 Times in 103 Posts

    Default Re: Checking QByteArray for certain values

    I think you're reading from the device wrong or something of that sort.

    Look at what your read() function returns (assign it to new bytearray and print).
    Make sure that you're geting what you expect and follow from there.

    the if(bytes[x]) will do what you want as long as you check correct and valid byte.

  2. The following user says thank you to Spitfire for this useful post:

    -Kyr0s- (25th October 2011)

Similar Threads

  1. How to set values in QByteArray?
    By Gokulnathvc in forum Newbie
    Replies: 2
    Last Post: 19th July 2011, 06:44
  2. Replies: 1
    Last Post: 22nd June 2011, 08:12
  3. Checking QByteArray
    By camol in forum Qt Programming
    Replies: 3
    Last Post: 18th March 2011, 13:07
  4. Extracting int values from QByteArray
    By Tottish in forum Newbie
    Replies: 4
    Last Post: 7th April 2010, 10:41
  5. Replies: 9
    Last Post: 25th July 2009, 13:27

Tags for this Thread

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.