[prev in list] [next in list] [prev in thread] [next in thread] 

List:       pykde
Subject:    Re: [PyQt] ANN: PyQt v4.6 and SIP v4.9 Released
From:       Christian Caron <ccaron () fattoc ! com>
Date:       2009-09-29 13:23:13
Message-ID: 5E6C261E-5F96-4BC6-8C9B-B3F406CBE63E () fattoc ! com
[Download RAW message or body]

Typo indeed.

Thanks!

Sent from my iPhone

On Sep 29, 2009, at 1:53 AM, Phil Thompson  
<phil@riverbankcomputing.com> wrote:

> On Mon, 28 Sep 2009 12:59:52 -0700, Christian Caron  
> <ccaron@fattoc.com>
> wrote:
>> I just upgraded and I get problems patching at the instance level.
>>
>> I used to patch my own 'customEvent' on the QApplication at the
>> instance level. This doesn't work anymore.
>>
>> Patching still works at the class level. The following code
>> illustrates this:
>>
>>
>> from PyQt4.QtCore import *
>> from PyQt4.QtGui import *
>>
>> class App(QApplication):
>>     def customEvent(self, event):
>>         print 'inherited', event
>>
>> if __name__ == '__main__':
>>
>>     def classPatch(self, event):
>>         print 'classPatch', event
>>
>>     def instancePatch(event):
>>         print 'instancePatch', event
>>
>>     # This still works
>>     # App.customEvent = classPatch
>>
>>     app = App([])
>>
>>     # This used to work but doesn't anymore.
>>     # app.customEvent = instancePatch
>>
>>     QApplication.sendEvent(app, QEvent(1000))
>>
>>     widget = QWidget()
>>     widget.show()
>>
>>     app.exec_()
>
> Fixed in tonight's SIP snapshot. However, your instance patch needs  
> a self
> argument. If that worked before (and it's not a typo) then it was a  
> bug.
>
> Phil
_______________________________________________
PyQt mailing list    PyQt@riverbankcomputing.com
http://www.riverbankcomputing.com/mailman/listinfo/pyqt
[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic