Warning, /sdk/cutehmi/extensions/CuteHMI/Modbus.4/dev/CuteHMI.Modbus-9.workaround.Qt.design.txt is written in an unsupported language. File is not indexed.
0001 Problem: 0002 0003 QModbusDataUnit::dataWritten() signal accepts `int` type as its `size` parameter, 0004 while QModbusDataUnit::valueCount() uses `uint` as return type. As such it is 0005 incompatible with `size` parameter, which might not be able to represent all 0006 returned values. 0007 0008 Workaround: 0009 0010 Because valueCount() can not exceed maximal theoretical amount of registers that 0011 can be queried at once (2008 coils through RTU) it should be safe to cast 0012 returned `uint` value to `int`, which is guaranteed to be at least 16 bit wide. 0013 0014 Snippet: 0015