[PySide] subclassing dict to connect to QT signal

Frank Rueter | OHUfx frank at ohufx.com
Sun Oct 22 08:21:57 CEST 2017

Hi all,

I am trying to subclass dict in order to connect it to a QT signal which 
will create a value in a predetermined key.

This is what I got:

class CustomDict(dict):
     '''Container for a simple version dictionary to be able to connect 
a signal to it'''

     def setData(self, data):
         self['my_custom_data'] = data

However, when I try to connect the setData method I get this:


TypeError: unhashable type: 'CustomDict'

Can somebody help me understand what's going on?


ohufxLogo 50x50 <http://www.ohufx.com> 	*vfx compositing 
<http://ohufx.com/index.php/vfx-compositing> | *workflow customisation 
and consulting <http://ohufx.com/index.php/vfx-customising>* *

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.qt-project.org/pipermail/pyside/attachments/20171022/77cfedfe/attachment.html>

More information about the PySide mailing list