[PyQt] Additional decorators - not working correctly anymore
phil at riverbankcomputing.co.uk
Thu May 31 23:06:35 BST 2007
On Thursday 31 May 2007 9:26 pm, Necoro wrote:
> me again ;) (just don't want to mangle the two topics.).
I think I agree with your other report - I need to do some testing.
> Switched from PyQt-4.1.1 to PyQt-4.2. and now the following does not
> work anymore:
> def on_searchBtn_clicked(self):
> print "i have been clicked"
> Window.watch_cursor is defined as follows:
> def watch_cursor (func):
> """This is a decorator for functions being so time consuming, that
> it is appropriate to show the watch-cursor."""
> def wrapper (*args, **kwargs):
> ret = None
> ret = func(*args, **kwargs)
> return ret
> return wrapper
> If I remove the "watch_cursor" decorator, "on_searchBtn_clicked" is
> executed - but not if I use the decorator :(.
> Can anybody give me a hint or tell me, why this is not working?
Can you produce a small example that demonstrates the problem?
More information about the PyQt