View Single Post
Posts: 15 | Thanked: 87 times | Joined on Dec 2009
#5
Originally Posted by mikaelh View Post
Thanks guys. I seemed to encounter another problem with PySide that I did not have with PyQt: it is not allowed to link a signal to a Python method that is part of a class that inherits one of the Qt classes, apparently because the inherited class is still C++, if you ask PySide, and you are not allowed to define dynamic slots in PySide Thus, following rm42's lead I defined the following convenience function:
Could you do a huge favour and report this issue in the PySide Bugzilla (preferably together with example code, if possible). We'd absolutely like to nail down such issues before the 1.0 release!

Originally Posted by mikaelh View Post
Now. all this works for me, but is it somehow wrong or against how Qt and PySide are intended to work? Especially, I do not see a lot of use for the new-style signals and slots, so I know there must be something I am not getting here.
If the convenience functions work and make your life easier, then by all means, just use them.

I guess the issue with new-style signals and slots is that they're a rather recent addition both in PyQt and PySide, and therefore most of the code lying around is still written using the old syntax. Personally, I much prefer the new one since it's much cleaner, and not handling the signal and slot as strings should ensure typos are caught at a slightly earlier phase. I'm not sure about the implementation, but I suspect the new one might actually be slightly more efficient as well.

Last edited by mairas; 2010-08-23 at 07:45. Reason: Fixed a typo.