Skip to content

Commit 83594c7

Browse files
committed
improved docs
1 parent 3cf87c7 commit 83594c7

File tree

1 file changed

+32
-30
lines changed

1 file changed

+32
-30
lines changed

src/PythonQtDoc.h

Lines changed: 32 additions & 30 deletions
Original file line numberDiff line numberDiff line change
@@ -66,31 +66,12 @@
6666
Image Processing and Visualization platform MeVisLab (http://www.mevislab.de)
6767
scriptable from Python.
6868
69+
6970
\section Download
7071
7172
PythonQt is hosted on SourceForge at http://sourceforge.net/projects/pythonqt , you can access it via SVN
7273
or download a tarball.
7374
74-
\section Licensing
75-
76-
PythonQt is distributed under the LGPL license, so it pairs well with the LGPL of the Qt 4.5 release and allows
77-
to be used in commercial applications when following the LGPL 2.1 obligations.
78-
79-
\section LicensingWrapper Licensing of Wrapper Generator
80-
81-
The build system of PythonQt makes use of a modified version of the LGPL'ed QtScript generator,
82-
located in the "generator" directory.
83-
84-
See http://qt.gitorious.org/qt-labs/qtscriptgenerator for details on the original project.
85-
Thanks a lot to the QtJambi guys and the QtScript Generator project for the C++ parser and
86-
Qt typesystem files!
87-
88-
The PythonQt wrappers generated by the generator located in the "generated_cpp" directory are free to be used without any licensing restrictions.
89-
90-
The generated wrappers are pre-generated and checked-in for Qt 4.6.1, so you only need to build and run the
91-
generator when you want to build additional wrappers or you want to upgrade/downgrade to another Qt version.
92-
You may use the generator to generate C++ bindings for your own C++ classes (e.g., to make them inheritable in Python),
93-
, but this is currently not documented and involves creating your own typesystem files (although the Qt Jambi examples might help you).
9475
9576
\section Features
9677
@@ -136,8 +117,29 @@
136117
- Any Qt class that has virtual methods can be easily derived from Python and the virtual methods can be reimplemented in Python (this feature is considered experimental!)
137118
- Polymorphic downcasting on QEvent, QGraphicsItem, QStyleOption, ...
138119
- Multiple inheritance support (e.g., QGraphicsTextItem is a QObject AND a QGraphicsItem, PythonQt will handle this well)
120+
139121
140-
\section Comparision Comparision with PyQt/PySide
122+
\section Licensing
123+
124+
PythonQt is distributed under the LGPL license, so it pairs well with the LGPL of the Qt 4.5 release and allows
125+
to be used in commercial applications when following the LGPL 2.1 obligations.
126+
127+
The build system of PythonQt makes use of a modified version of the LGPL'ed QtScript generator,
128+
located in the "generator" directory.
129+
130+
See http://qt.gitorious.org/qt-labs/qtscriptgenerator for details on the original project.
131+
Thanks a lot to the QtJambi guys and the QtScript Generator project for the C++ parser and
132+
Qt typesystem files!
133+
134+
The PythonQt wrappers generated by the generator located in the "generated_cpp" directory are free to be used without any licensing restrictions.
135+
136+
The generated wrappers are pre-generated and checked-in for Qt 4.6.1, so you only need to build and run the
137+
generator when you want to build additional wrappers or you want to upgrade/downgrade to another Qt version.
138+
You may use the generator to generate C++ bindings for your own C++ classes (e.g., to make them inheritable in Python),
139+
but this is currently not documented and involves creating your own typesystem files (although the Qt Jambi examples might help you).
140+
141+
142+
\section Comparison Comparison with PyQt/PySide
141143
142144
- PythonQt is not as pythonic as PyQt in many details (e.g. buffer protocol, pickling, translation support, ...) and it is mainly thought for embedding and intercommunication between Qt/Cpp and Python
143145
- PythonQt allows to communicate in both directions, e.g., calling a Python object from C++ AND calling a C++ method from Python, while PyQt only handles the Python->C++ direction
@@ -173,7 +175,7 @@
173175
<tr><td>long</td><td>integer</td></tr>
174176
<tr><td>ulong,longlong,ulonglong</td><td>long</td></tr>
175177
<tr><td>QString</td><td>unicode string</td></tr>
176-
<tr><td>QByteArray</td><td>str</td></tr>
178+
<tr><td>QByteArray</td><td>QByteArray wrapper</td></tr>
177179
<tr><td>char*</td><td>str</td></tr>
178180
<tr><td>QStringList</td><td>tuple of unicode strings</td></tr>
179181
<tr><td>QVariantList</td><td>tuple of objects</td></tr>
@@ -182,17 +184,17 @@
182184
<tr><td>QSize, QRect and all other standard Qt QVariants</td><td>variant wrapper that supports complete API of the respective Qt classes</td></tr>
183185
<tr><td>OwnRegisteredMetaType</td><td>C++ wrapper, optionally with additional information/wrapping provided by registerCPPClass()</td></tr>
184186
<tr><td>QList<AnyObject*></td><td>converts to a list of CPP wrappers</td></tr>
185-
<tr><td>EnumType</td><td>integer (all enums that are known via the moc and the Qt namespace are supported)</td></tr>
187+
<tr><td>QVector<AnyObject*></td><td>converts to a list of CPP wrappers</td></tr>
188+
<tr><td>EnumType</td><td>Enum wrapper derived from python integer</td></tr>
186189
<tr><td>QObject (and derived classes)</td><td>QObject wrapper</td></tr>
187190
<tr><td>C++ object</td><td>CPP wrapper, either wrapped via PythonQtCppWrapperFactory or just decorated with decorators</td></tr>
188191
<tr><td>PyObject</td><td>PyObject</td></tr>
189192
</table>
190193
191-
PyObject is passed as simple pointer, which allows to pass/return any Python Object directly to/from
192-
a Qt slot.
194+
PyObject is passed as direct pointer, which allows to pass/return any Python object directly to/from
195+
a Qt slot that uses PyObject* as its argument/return value.
193196
QVariants are mapped recursively as given above, e.g. a dictionary can
194197
contain lists of dictionaries of doubles.
195-
For example a QVariant of type "String" is mapped to a python unicode string.
196198
All Qt QVariant types are implemented, PythonQt supports the complete Qt API for these object.
197199
198200
\section QObject QObject Wrapping
@@ -413,15 +415,15 @@ the python2x.[lib | dll | so | dynlib].
413415
When using the prebuild Python installer, this will be:
414416
415417
\code
416-
> set PYTHON_PATH = c:\Python25
417-
> set PYTHON_LIB = c:\Python25\libs
418+
> set PYTHON_PATH = c:\Python26
419+
> set PYTHON_LIB = c:\Python26\libs
418420
\endcode
419421
420422
When using the python sources, this will be something like:
421423
422424
\code
423-
> set PYTHON_PATH = c:\yourDir\Python-2.5.1\
424-
> set PYTHON_LIB = c:\yourDir\Python-2.5.1\PCbuild8\Win32
425+
> set PYTHON_PATH = c:\yourDir\Python-2.6.1\
426+
> set PYTHON_LIB = c:\yourDir\Python-2.6.1\PCbuild8\Win32
425427
\endcode
426428
427429
To build all, do the following (after setting the above variables):

0 commit comments

Comments
 (0)