[PyQt] QSharedMemory Example Crashing

Cody Scott cody at perspexis.com
Tue Sep 5 17:25:08 BST 2017


Yes that works.

The correct line is

self.sharedMemory.data()[:size] = buf.data()[:size]



On Tue, Sep 5, 2017 at 12:21 PM, Phil Thompson <phil at riverbankcomputing.com>
wrote:

> On 5 Sep 2017, at 5:18 pm, Cody Scott <cody at perspexis.com> wrote:
> >
> > Traceback (most recent call last):
> >   File "sharedmemory.py", line 133, in loadFromFile
> >     self.sharedMemory.data()[:size] = buf.data().data[:size]
> > TypeError: 'builtin_function_or_method' object is not subscriptable
>
> data()[:size] then
>
> Phil
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://www.riverbankcomputing.com/pipermail/pyqt/attachments/20170905/7bf209ec/attachment-0001.html>


More information about the PyQt mailing list