[PySide] QByteArray.fromRawData from bytearray/numpy

Tim Roberts timr at probo.com
Fri Oct 16 19:07:17 CEST 2020


許友綸 wrote:
>
> hi, QByteArray consturctor can take both bytes and bytearray as its 
> argument
> The docs says it makes its own copy. I want a python buffer(numpy) 
> changing in real-time to be plotted/processed in QML.

How would Qt know that the data had changed and the plot needed to be 
regenerated?   Since you need to refresh the plot when the data changes, 
it's no more trouble to pass in the replacement array.

-- 
Tim Roberts, timr at probo.com
Providenza & Boekelheide, Inc.


-------------- next part --------------
A non-text attachment was scrubbed...
Name: smime.p7s
Type: application/pkcs7-signature
Size: 3389 bytes
Desc: S/MIME Cryptographic Signature
URL: <http://lists.qt-project.org/pipermail/pyside/attachments/20201016/c6e391fa/attachment.bin>


More information about the PySide mailing list