PyCustomMetaTypeExample -> ImportError: cannot import name CustomObject
PyCPPWrapperExample -> NameError: name 'CustomObject' is not defined
PyDecoratorsExample -> NameError: name 'QSize' is not defined
etc…
Looks like there is a problem about wrapped object.
How i can find the origin of this problem ?
I used PythonQt 2.0.1 - Qt 4.6.2 - Python 2.6.5
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
Most example doesn't work for me.
PyCustomMetaTypeExample -> ImportError: cannot import name CustomObject
PyCPPWrapperExample -> NameError: name 'CustomObject' is not defined
PyDecoratorsExample -> NameError: name 'QSize' is not defined
etc…
Looks like there is a problem about wrapped object.
How i can find the origin of this problem ?
I used PythonQt 2.0.1 - Qt 4.6.2 - Python 2.6.5
Thanks for the feedback, I have to admit that I did not have time to test all examples before the release.
I think there are two issues:
Objects that are registered without a package name are placed into PythonQt.private instead of PythonQt starting with 2.0,
so one has to write:
from PythonQt.private import CustomObject
The other issue is that QSize etc. are now located in PythonQt.QtCore / QtGui and one has to write:
from PythonQt.QtCore import QSize, …
QSize()
or
from PythonQt import as QtCore
QtCore.QSize()
This should get the examples fixed quickly.
I currently have no time to fix the examples, but if you send me patches, I will add them.
Latest svn commit fix most example.
Thanks