[PyQt] [PyQt 4.5] TypeError: pyqtBoundSignal cannot be converted to QObject in this context

Alexandr N Zamaraev tonal at promsoft.ru
Thu Apr 9 09:13:27 BST 2009


I try port my applications to PyQt 4.5
And I recive TypeError:
[code]
Traceback (most recent call last):
  ...
   File 
"C:\Lang\Projects\Promsoft\mun_ob\doc_circ\src\links\DataRightOwner.py", 
line 48, in __init__
     self.__connectAll()
   File 
"C:\Lang\Projects\Promsoft\mun_ob\doc_circ\src\links\DataRightOwner.py", 
line 189, in __connectAll
     for dm in (self.__phys, self.__jur, self.__bus):
TypeError: PyQt4.QtCore.pyqtBoundSignal cannot be converted to 
PyQt4.QtCore.QObject in this context
[/code]

How correct this error?

Snipped Code for illustrate:
[code]
class DataLink(QtCore.QObject):
   data_adds = QtCore.QtCore.pyqtSignal(frozenset)

class DataRightLandPhys(DataLink): pass
class DataRightLandJur(DataLink): pass
class DataRightLandJur(DataLink): pass

class Data(DataLink):
   __phys = None
   __jur = None
   __bus = None
   def __init__(self):
     super(Data, self).__init__()
     self.__phys = DataRightLandPhys()
     self.__jur = DataRightLandJur()
     self.__bus = DataRightLandBus()
     self.__connectAll()

   def __connectAll(self):
     for dm in (self.__phys, self.__jur, self.__bus):
       dm.data_adds.connect(self.data_adds.emit)
[/code]



More information about the PyQt mailing list