<html>
  <head>

    <meta http-equiv="content-type" content="text/html; charset=utf-8">
  </head>
  <body text="#000000" bgcolor="#FFFFFF">
    Hi all,<br>
    <br>
    I am trying to subclass dict in order to connect it to a QT signal
    which will create a value in a predetermined key.<br>
    <br>
    This is what I got:<br>
    <br>
    class CustomDict(dict):<br>
        '''Container for a simple version dictionary to be able to
    connect a signal to it'''<br>
       <br>
        def setData(self, data):<br>
            self['my_custom_data'] = data<br>
    <br>
    <br>
    However, when I try to connect the setData method I get this:<br>
    <br>
    worker.receivedData.connect(customDict.setData)<br>
    <br>
       
    <style type="text/css">p, li { white-space: pre-wrap; }
</style>TypeError: unhashable type: 'CustomDict'<br>
    <br>
    <br>
    Can somebody help me understand what's going on?<br>
    <br>
    Cheers,<br>
    frank<br>
    <br>
    <br>
    <div class="moz-signature">-- <br>
      <table style="width: 524px; height: 58px;" border="0">
        <tbody>
          <tr>
            <td style="text-align: center;"><a
                href="http://www.ohufx.com"><img
                  src="http://ohufx.com/images/ohufxLogo_50x50.png"
                  alt="ohufxLogo 50x50"></a></td>
            <td style="text-align: center;"><strong><span
                  style="font-size: 10pt;"><a
                    href="http://ohufx.com/index.php/vfx-compositing">vfx
                    compositing</a></span> | <span style="font-size:
                  10pt;"><strong><a
                      href="http://ohufx.com/index.php/vfx-customising">workflow
                      customisation and consulting</a></strong> </span>
              </strong></td>
          </tr>
        </tbody>
      </table>
    </div>
  </body>
</html>