I am trying to explain briefly, with pseudo code
serial data frame Format:
--------------------------------------------------------------------------------------------------------------------...
If struct x_hdr's size is less than 256 bytes, then only one byte is needed to hold the size. I think you are confusing the sizes of the variables in the struct with the size of the struct itself. ...
d_stranz Yesterday, 21:46QByteArray::append() sounds like it could be useful for appending to a QByteArray.
d_stranz Yesterday, 21:39Thanks...
Just want to know, to build a package I am using QByteArray. But my Len and Checksum are of 2 bytes in size. How can I append 2 bytes to QByteArray?
Best Regards,
Anita
Hi,
My structure contains a variable of type quint16_t and before sending to a device through serial port, I am appending it to a QByteArray. As QByteArray holds byte, I see only one byte is sent....
Qt Centre is a community site devoted to programming in C++ using the Qt framework developed at Digia.
If you have any problems with Qt or its usage, you can get help from the members of Qt community on our forum.
Don't forget to check out our links section for more Qt resources.
Qt is a cross-platform application and UI framework. Using Qt, you can write web-enabled applications once and deploy them across desktop, mobile and embedded operating systems without rewriting the source code.
Qt Creator can't locate Qwt plugin
18th January 2021 09:24 by trouden