Menu

Most examples doesn't work

Help
ascii
2010-05-27
2013-04-06
  • ascii

    ascii - 2010-05-27

    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

     
  • Florian Link

    Florian Link - 2010-05-27

    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.

     
  • ascii

    ascii - 2010-05-30

    Latest svn commit fix most example.

    Thanks

     

Log in to post a comment.

Want the latest updates on software, tech news, and AI?
Get latest updates about software, tech news, and AI from SourceForge directly in your inbox once a month.