Skip to content

Commit 2f93107

Browse files
committed
improved docs
1 parent db3776c commit 2f93107

File tree

1 file changed

+21
-18
lines changed

1 file changed

+21
-18
lines changed

src/PythonQtDoc.h

Lines changed: 21 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -53,19 +53,21 @@
5353
5454
\section Introduction
5555
56-
\b PythonQt is a dynamic Python (http://www.python.org) binding for the Qt framework (http://qt.nokia.com).
56+
\b PythonQt is a dynamic <a href="http://www.python.org" target="_blank">
57+
Python</a> binding for the <a href="http://qt.nokia.com" target="_blank">
58+
Qt framework</a>.
5759
It offers an easy way to embed the Python scripting language into
5860
your C++ Qt applications. It makes heavy use of the QMetaObject system and thus requires Qt 4.x.
5961
6062
The focus of PythonQt is on embedding Python into an existing C++ application, not on writing the whole
6163
application completely in Python. If you want to write your whole application in Python,
62-
you should use <a href="http://www.riverbankcomputing.co.uk/pyqt/">PyQt</a> or <a href="http://www.pyside.org">PySide</a> instead.
64+
you should use <a href="http://www.riverbankcomputing.co.uk/pyqt/" target="_blank">PyQt</a> or <a href="http://www.pyside.org" target="_blank">PySide</a> instead.
6365
6466
If you are looking for a simple way to embed Python objects into your C++/Qt Application
6567
and to script parts of your application via Python, PythonQt is the way to go!
6668
6769
PythonQt is a stable library that was developed to make the
68-
Image Processing and Visualization platform MeVisLab (http://www.mevislab.de)
70+
Image Processing and Visualization platform <a href="http://www.mevislab.de" target="_blank">MeVisLab</a>
6971
scriptable from Python.
7072
7173
\page Features Features
@@ -115,9 +117,24 @@
115117
- Polymorphic downcasting on QEvent, QGraphicsItem, QStyleOption, ...
116118
- Multiple inheritance support (e.g., QGraphicsTextItem is a QObject AND a QGraphicsItem, PythonQt will handle this well)
117119
120+
\section Comparison Comparison with PyQt/PySide
121+
122+
- 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
123+
- 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
124+
- PythonQt offers properties as Python attributes, while PyQt offers them as setter/getter methods (e.g. QWidget.width is a property in PythonQt and a method in PyQt)
125+
- PythonQt currently does not support instanceof checks for Qt classes, except for the exact match and derived Python classes
126+
- QObject.emit to emit Qt signals from Python is not yet implemented but PythonQt allows to just emit a signal by calling it like a normal slot
127+
- PythonQt does not (yet) offer to add new signals to Python/C++ objects and it does not yet support the newstyle PyQt signals (so you need to connect via C++ string signatures)
128+
- Ownership of objects is a bit different in PythonQt, currently Python classes derived from a C++ class need to be manually referenced in Python to not get deleted too early (this will be fixed in a future version)
129+
- QStrings are always converted to unicode Python objects, QByteArray always stays a QByteArray and can be converted using str()
130+
- There are many details in the generated wrappers that could need some polishing, e.g., methods that use pointer arguments for additional return values could return a results tuple.
131+
- Not all types of QList/QVector/QHash templates are supported, some Qt methods use those as arguments/return values (but you can add your own handlers to handle them if you need them).
132+
- Probably there are lots of details that differ, I do not know PyQt that well to list them all.
133+
- In the long run, PythonQt will consider using/extending PySide with the features of PythonQt to get rid of its own generator and typesystem files, alternatively the KDE Smoke generator might be used in the future (this has not yet been decided, the current PythonQt generator works well and there is no hurry to switch).
134+
118135
\page Download Download
119136
120-
PythonQt is hosted on SourceForge at http://sourceforge.net/projects/pythonqt.
137+
PythonQt is hosted on <a href="http://sourceforge.net/projects/pythonqt/" target="_blank">SourceForge</a>.
121138
122139
You can download the source code as a tarball at http://sourceforge.net/projects/pythonqt/files/.
123140
Alternatively you can get the latest version from the svn repository.
@@ -146,20 +163,6 @@
146163
You may use the generator to generate C++ bindings for your own C++ classes (e.g., to make them inheritable in Python),
147164
but this is currently not documented and involves creating your own typesystem files (although the Qt Jambi examples might help you).
148165
149-
\section Comparison Comparison with PyQt/PySide
150-
151-
- 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
152-
- 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
153-
- PythonQt offers properties as Python attributes, while PyQt offers them as setter/getter methods (e.g. QWidget.width is a property in PythonQt and a method in PyQt)
154-
- PythonQt currently does not support instanceof checks for Qt classes, except for the exact match and derived Python classes
155-
- QObject.emit to emit Qt signals from Python is not yet implemented but PythonQt allows to just emit a signal by calling it like a normal slot
156-
- PythonQt does not (yet) offer to add new signals to Python/C++ objects and it does not yet support the newstyle PyQt signals (so you need to connect via C++ string signatures)
157-
- Ownership of objects is a bit different in PythonQt, currently Python classes derived from a C++ class need to be manually referenced in Python to not get deleted too early (this will be fixed in a future version)
158-
- QStrings are always converted to unicode Python objects, QByteArray always stays a QByteArray and can be converted using str()
159-
- There are many details in the generated wrappers that could need some polishing, e.g., methods that use pointer arguments for additional return values could return a results tuple.
160-
- Not all types of QList/QVector/QHash templates are supported, some Qt methods use those as arguments/return values (but you can add your own handlers to handle them if you need them).
161-
- Probably there are lots of details that differ, I do not know PyQt that well to list them all.
162-
- In the long run, PythonQt will consider using/extending PySide with the features of PythonQt to get rid of its own generator and typesystem files, alternatively the KDE Smoke generator might be used in the future (this has not yet been decided, the current PythonQt generator works well and there is no hurry to switch).
163166
164167
\page Developer Developer
165168

0 commit comments

Comments
 (0)