On 17.12.2010 14:03, ext Thomas Perl wrote:
Not using it personally, but I think it would be helpful for drive-by
developers if this warning was prominently placed at the top of
QUILoader's documentation (until this is fixed), so that developers
who want to use it quickly see that it has to be avoided. They won't
go looking in the mailing list archives if they should or should not
use it.
You're right, of course. I made a bug about the documentation issue (bug
553) - the warning will appear there in no time.
Ideally, a summary of the different ways it is broken could also be
helpful, so that developers can decide for themselves if they can use
it or not in their special use case.
Hugo described the issue in bug 533:
"When a object, e.g.: QWidget is created by PySide it create instances
of QWidgetWrapper, not QWidget. QWidgetWrapper is a C++ class which just
inherits QWidget and have all virtual methods implemented, the
implementation of each virtual method redirect the virtual call to
Python if the there's a Python implementation otherwise calls the normal
C++ method.
As the objects returned by QUiLoader().load() were created by Qt, not by
PySide, they are instances of QWidget, not QWidgetWrapper, so they don't
have the code to redirect the virtual method calls to Python and your
code don't work.
The only way to solve this is reimplement the load() method in python,
but I don't really know how much work is needed to do this."
There might be additional related issues, e.g. bug 552.
Cheers,
ma.
_______________________________________________
PySide mailing list
[email protected]
http://lists.openbossa.org/listinfo/pyside