[PyKDE] QCustomEvent::QCustomEvent ( Type type, void * data ) constructor no longer supported?

Tuvi, Selim stuvi at slac.stanford.edu
Wed Feb 16 02:24:49 GMT 2005


The following code which used to work with PyQt 3.13 does not work with PyQt-commercial-snapshot-20050211:

class PorcineEvent(qt.QCustomEvent):
    StatusChangeType=qt.QEvent.User+10
    CommandingChangeType=qt.QEvent.User+11
    def __init__(self,type,data):
        qt.QCustomEvent.__init__(self,type,data)

Traceback (most recent call last):
  File "c:\projects\LATTE\tools\taskEngine.py", line 74, in run
    taskArgsKwargs[0](*taskArgsKwargs[1:-1], **taskArgsKwargs[-1])
  File "c:\projects\LATTE\power\PorcinePanel.py", line 272, in __getStatus
    qt.QApplication.postEvent(self,PorcineEvent(PorcineEvent.StatusChangeType,st
atus))
  File "c:\projects\LATTE\power\PorcinePanel.py", line 400, in __init__
    qt.QCustomEvent.__init__(self,type,data)
TypeError: too many arguments to QCustomEvent(), 1 at most expected

Thanks
-Selim

Selim Tuvi, Research Engineering Group, SLAC
GLAST, I&T Online, MS 98
Tel:650-926-3376 Fax:650-926-4335
 




More information about the PyQt mailing list