Results 1 to 7 of 7

Thread: PythonQt 1.0

  1. #1
    Join Date
    May 2007
    Posts
    4
    Qt products
    Qt4
    Platforms
    MacOS X Unix/X11 Windows

    Default PythonQt 1.0

    I would like to announce the PythonQt 1.0 release,
    a dynamic and lightweight script binding of the Qt4
    framework to the Python language.
    It is very easy to embedd into existing Qt applications.

    PythonQt is released under the LGPL license, so it can be used both in commercial and open source projects.

    Details on the 1.0 release can be found at:

    http://pythonqt.sourceforge.net/
    http://sourceforge.net/projects/pythonqt/

    In contrast to PyQt (http://www.riverbankcomputing.co.uk/pyqt/), PythonQt is NOT a complete wrapper of the complete Qt API, but instead offers a very dynamic way to script QObjects and manually wrapped C++ classes inside of your Qt4 applications.

    So you can best compare PythonQt with QtScript, which has been published with the Qt 4.3 RC1, but instead of JavaScript, the embedded script language is Python.

    A short feature overview of the 1.0 release:

    - Access all slots, properties, children and registered enums of any QObject derived class from Python
    - Connecting Qt Signals to Python functions (both from within Python and from C++)
    - Wrapping of C++ objects (which are not derived from QObject) via PythonQtCPPWrapperFactory
    - Extending C++ and QObject derived classes with additional slots, static methods and constructors (see Decorators)
    - StdOut/Err redirection to Qt signals instead of cout
    - Support for ALL built-in Qt QVariant types (with complete API mapped to Python)
    - Support for custom MetaTypes in QVariants
    - Easy way to wrap non-slot methods of existing QObject derived classes with "decorator slots"
    - Complete Qt GUI Constructors/Destructors support via QUILoader
    - Support for CPP Constructors and easy manual wrapping of CPP API
    - Complete support for Enum types
    - Support for Qt namespace and Enums
    - Support for loading python scripts from Qt resources (see examples)
    - Auto-completion on the PyScriptConsole, which is now part of PythonQt core library
    - support for dir() statement on all wrapped objects
    - new help() method that prints details on wrapped objects

  2. #2
    Join Date
    Mar 2006
    Location
    Mountain View, California
    Posts
    489
    Thanks
    3
    Thanked 74 Times in 54 Posts
    Qt products
    Qt3 Qt4 Qt/Embedded
    Platforms
    MacOS X Unix/X11 Windows

    Default Re: PythonQt 1.0

    Bravo! Yet another reason for me to learn Python! :-)

  3. #3
    Join Date
    Apr 2006
    Posts
    29
    Thanks
    1
    Thanked 1 Time in 1 Post
    Qt products
    Qt4
    Platforms
    MacOS X Unix/X11

    Default Re: PythonQt 1.0

    Very nice !

    So if I understand well, PythonQt can be used to replace Qsa ?

    How easy can it be embedded in an application in comparaison to Qsa ?

  4. #4
    Join Date
    May 2007
    Posts
    1
    Qt products
    Qt4
    Platforms
    Windows

    Default Re: PythonQt 1.0

    How does PythonQt compare to using Boost.Python to embed Python in a Qt application?

  5. #5
    Join Date
    May 2007
    Posts
    4
    Qt products
    Qt4
    Platforms
    MacOS X Unix/X11 Windows

    Default Re: PythonQt 1.0

    Yes, PythonQt can "replace" QSA, or coexist in the same application.
    The integration of PythonQt is as easy as integrating QSA, the biggest difference is that you need to add the Python binary and the Python/Libs to your application in addition to PythonQt,
    while QSA is self-contained.

    PythonQt is completly dynamic, while Boost.Python requires to generate wrapper
    objects for every object that you want to access. PythonQt makes use of the QMetaObject system to allow dynamic signal/slot/property access.

  6. #6
    Join Date
    Apr 2006
    Posts
    29
    Thanks
    1
    Thanked 1 Time in 1 Post
    Qt products
    Qt4
    Platforms
    MacOS X Unix/X11

    Default Re: PythonQt 1.0

    I'm very interested in this project. What about an equivalent for QSEditor and maybe QSWorkbench ?

    The svn version does not compile. I can send a patch but it should be really easy to fix.

  7. #7
    Join Date
    May 2007
    Posts
    4
    Qt products
    Qt4
    Platforms
    MacOS X Unix/X11 Windows

    Default Re: PythonQt 1.0

    Please send the patch to florian (at) mevis.de, I did not recognize that it
    does not compile because I work on a different svn branch in my company.

    I started implementing an own TextEditor with
    - Python syntax highlighting
    - Autocompletion for builtins, keywords and types in an attached python module
    - Autocompletion for import
    - Autoindent/dedent after ident/dedend keywords
    - Brace matching
    - Outline which shows classes and functions in the loaded file

    It will first be incorportated in our product MeVisLab and I hope I find some time to create a standalone version for PythonQt.

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
Digia, Qt and their respective logos are trademarks of Digia Plc in Finland and/or other countries worldwide.