Your browser does not seem to support JavaScript. As a result, your viewing experience will be diminished, and you have been placed in read-only mode.
Please download a browser that supports JavaScript, or enable it if it's disabled (i.e. NoScript).
@RunThiner There's no need for such a loop. QSerialPort already provides an asynchronous API and if you really want to wait for data to be available, there's a blocking API for that as shown in the QSerialPort details.
@sdcr said:
(bites = sp->bytesAvailable())
Although it should return a reference to bites, it is not good coding practice imho. http://en.cppreference.com/w/cpp/language/operator_assignment