|
52 | 52 | \section Introduction
|
53 | 53 |
|
54 | 54 | \b PythonQt is a dynamic Python (http://www.python.org) binding for Qt (http://www.trolltech.com).
|
55 |
| - It offers an easy way to embedd the Python scripting language into |
| 55 | + It offers an easy way to embed the Python scripting language into |
56 | 56 | your Qt applications. It makes heavy use of the QMetaObject system and thus requires Qt4.x.
|
57 | 57 |
|
58 | 58 | In contrast to <a href="http://www.riverbankcomputing.co.uk/pyqt/">PyQt</a> , PythonQt is \b not a complete
|
59 | 59 | Python wrapper around the complete Qt functionality. So if you are looking for a way to
|
60 | 60 | write complete applications in Python using the Qt GUI, you should use PyQt.
|
61 | 61 |
|
62 |
| - If you are looking for a simple way to embed the Python language into your Qt Application |
63 |
| - and to script parts of your application via Python, PythonQt is the way to go! |
| 62 | + If you are looking for a simple way to embed Python objects into your C++/Qt Application |
| 63 | + and to script parts of your application via Python, PythonQt is the way to go! |
64 | 64 |
|
65 |
| - PythonQt is a stable library that was developed to make the Image Processing and Visualization platform MeVisLab (http://www.mevislab.de) |
| 65 | + PythonQt is a stable library that was developed to make the |
| 66 | + Image Processing and Visualization platform MeVisLab (http://www.mevislab.de) |
66 | 67 | scriptable from Python.
|
67 | 68 |
|
68 | 69 | \section Licensing
|
|
76 | 77 |
|
77 | 78 | \section Features
|
78 | 79 |
|
| 80 | + - Easy wrapping of Python objects from C++ with smart, reference-counting PythonQtObjectPtr. |
| 81 | + - Convenient conversions to/from QVariant for PythonQtObjectPtr. |
79 | 82 | - Access all \b slots, \b properties, children and registered enums of any QObject derived class from Python
|
80 | 83 | - Connecting Qt Signals to Python functions (both from within Python and from C++)
|
81 |
| - - Wrapping of C++ objects (which are not derived from QObject) via PythonQtCPPWrapperFactory |
| 84 | + - Wrapping of C++ objects (which are not derived from QObject) via PythonQtCppWrapperFactory |
82 | 85 | - Extending C++ and QObject derived classes with additional slots, static methods and constructors (see Decorators)
|
83 | 86 | - StdOut/Err redirection to Qt signals instead of cout
|
84 |
| - - Interface for creating your own \c import replacement, so that Python scripts can be e.g. signed/verified before they are executed (PythonQtImportInterface) |
| 87 | + - Interface for creating your own \c import replacement, so that Python scripts can be e.g. signed/verified before they are executed (PythonQtImportFileInterface) |
85 | 88 | - Mapping of plain-old-datatypes and ALL QVariant types to and from Python
|
86 | 89 | - Support for wrapping of user QVariant types which are registerd via QMetaType
|
87 | 90 | - Support for Qt namespace (with all enumerators)
|
|
93 | 96 | Features that PythonQt does NOT support (and will not support):
|
94 | 97 |
|
95 | 98 | - you can not derive from QObjects inside of Python, this would require wrapper generation like PyQt does
|
96 |
| - - you can only script QObject derived classes, for normal C++ classes you need to create a PythonQtCPPWrapperFactory and adequate wrapper classes or add decorator slots |
| 99 | + - you can only script QObject derived classes, for normal C++ classes you need to create a PythonQtCppWrapperFactory and adequate wrapper classes or add decorator slots |
97 | 100 | - you can not access normal member functions of QObjects, only slots and properties, because the \b moc does not store normal member functions in the MetaObject system
|
98 | 101 |
|
99 | 102 | \section Interface
|
|
127 | 130 | <tr><td>OwnRegisteredMetaType</td><td>variant wrapper, optionally with a wrapper provided by addVariantWrapper()</td></tr>
|
128 | 131 | <tr><td>EnumType</td><td>integer (all enums that are known via the moc and the Qt namespace are supported)</td></tr>
|
129 | 132 | <tr><td>QObject (and derived classes)</td><td>QObject wrapper</td></tr>
|
130 |
| - <tr><td>C++ object</td><td>CPP wrapper, either wrapped via PythonQtCPPWrapperFactory or just decorated with decorators</td></tr> |
| 133 | + <tr><td>C++ object</td><td>CPP wrapper, either wrapped via PythonQtCppWrapperFactory or just decorated with decorators</td></tr> |
131 | 134 | <tr><td>PyObject</td><td>PyObject</td></tr>
|
132 | 135 | </table>
|
133 | 136 |
|
|
182 | 185 |
|
183 | 186 | \section CPP CPP Wrapping
|
184 | 187 |
|
185 |
| -You can create dedicated wrapper QObject for any C++ class. This is done by deriving from PythonQtCPPWrapperFactory |
186 |
| -and adding your factory via addWrapperFactory(). Whenever PythonQt encounters a CPP pointer (e.g. on a slot or signal) |
| 188 | +You can create dedicated wrapper QObject for any C++ class. This is done by deriving from PythonQtCppWrapperFactory |
| 189 | +and adding your factory via addWrapperFactory(). |
| 190 | +Whenever PythonQt encounters a CPP pointer (e.g. on a slot or signal) |
187 | 191 | and it does not known it as a QObject derived class, it will create a generic CPP wrapper. So even unknown C++ objects
|
188 | 192 | can be passed through Python. If the wrapper factory supports the CPP class, a QObject wrapper will be created for each
|
189 | 193 | instance that enters Python. An alternative to a complete wrapper via the wrapper factory are decorators, see \ref Decorators
|
|
0 commit comments