Skip to content

Commit 2496c03

Browse files
author
florianlink
committed
updated documentation
git-svn-id: http://svn.code.sf.net/p/pythonqt/code/trunk@287 ea8d5007-eb21-0410-b261-ccb3ea6e24a9
1 parent c3e40e9 commit 2496c03

File tree

1 file changed

+26
-11
lines changed

1 file changed

+26
-11
lines changed

src/PythonQtDoc.h

+26-11
Original file line numberDiff line numberDiff line change
@@ -54,10 +54,10 @@
5454
\section Introduction
5555
5656
\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">
57+
Python</a> binding for the <a href="http://qt-project.org/" target="_blank">
5858
Qt framework</a>.
5959
It offers an easy way to embed the Python scripting language into
60-
your C++ Qt applications. It makes heavy use of the QMetaObject system and thus requires Qt 4.x.
60+
your C++ Qt applications.
6161
6262
The focus of PythonQt is on embedding Python into an existing C++ application, not on writing the whole
6363
application completely in Python. If you want to write your whole application in Python,
@@ -78,7 +78,7 @@ Qt framework</a>.
7878
- \ref Examples
7979
8080
\page Features Features
81-
81+
8282
\section Builtin Built-in Features
8383
8484
The following are the built-in features of the PythonQt library:
@@ -124,6 +124,17 @@ Qt framework</a>.
124124
- Polymorphic downcasting on QEvent, QGraphicsItem, QStyleOption, ...
125125
- Multiple inheritance support (e.g., QGraphicsTextItem is a QObject AND a QGraphicsItem, PythonQt will handle this well)
126126
127+
\section Supported Supported Versions
128+
129+
PythonQt supports:
130+
- Python 2 (>= Python 2.6)
131+
- Python 3 (>= Python 3.3)
132+
- Qt 4.x (Qt 4.7 and Qt 4.8 recommended)
133+
- Qt 5.x (Tested with Qt 5.0 and 5.3)
134+
135+
The Qt5 support does not yet include Qt modules that have been introduced with Qt5. The new QtWidgets module is wrapped as part of QtGui.
136+
This allows to run scripts that were written with the Qt4 binding on a Qt5 PythonQt without porting.
137+
127138
\section Comparison Comparison with PyQt/PySide
128139
129140
- 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
@@ -133,11 +144,9 @@ Qt framework</a>.
133144
- 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
134145
- 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)
135146
- 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)
136-
- QStrings are always converted to unicode Python objects, QByteArray always stays a QByteArray and can be converted using str()
147+
- QStrings are always converted to unicode Python objects, QByteArray always stays a QByteArray and can be converted using str() or QByteArray.data()
137148
- 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.
138149
- 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).
139-
- Probably there are lots of details that differ, I do not know PyQt that well to list them all.
140-
- 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).
141150
142151
\page Download Download
143152
@@ -149,7 +158,7 @@ Qt framework</a>.
149158
You can also browse the source code online via ViewVC: http://pythonqt.svn.sourceforge.net/viewvc/pythonqt/trunk/
150159
151160
\note We do not offer prebuilt binaries, since there are so many possible combinations of
152-
platforms (Windows/Linux/MacOs), architectures (32/64 bit) and Python versions.
161+
platforms (Windows/Linux/MacOs), architectures (32/64 bit) and Qt / Python versions.
153162
154163
\page License License
155164
@@ -414,17 +423,18 @@ yourCpp = None
414423
415424
\page Building Building
416425
417-
PythonQt requires at least Qt 4.6.1 (for earlier Qt versions, you will need to run the pythonqt_gerenator, Qt 4.3 is the absolute minimum) and Python 2.5.x or 2.6.x on Windows, Linux and MacOS X. It has not yet been tested with Python 3.x, but it should only require minor changes.
426+
PythonQt requires at least Qt 4.6.1 (for earlier Qt versions, you will need to run the pythonqt_generator, Qt 4.3 is the absolute minimum) and Python 2.6.x/2.7.x or Python 3.3 (or higher).
418427
To compile PythonQt, you will need a python developer installation which includes Python's header files and
419428
the python2x.[lib | dll | so | dynlib].
429+
The recommended way to build PythonQt is to use the QMake-based *.pro file.
420430
The build scripts a currently set to use Python 2.6.
421431
You may need to tweak the \b build/python.prf file to set the correct Python includes and libs on your system.
422-
432+
423433
\subsection Windows
424434
425435
On Windows, the (non-source) Python Windows installer can be used.
426-
Make sure that you use the same compiler, the current Python distribution is built
427-
with Visual Studio 2003. If you want to use another compiler, you will need to build
436+
Make sure that you use the same compiler as the one that your Python distribution is built with.
437+
If you want to use another compiler, you will need to build
428438
Python yourself, using your compiler.
429439
430440
To build PythonQt, you need to set the environment variable \b PYTHON_PATH to point to the root
@@ -459,6 +469,11 @@ the python2x.[lib | dll | so | dynlib].
459469
460470
The tests and examples are located in PythonQt/lib.
461471
472+
When using a Python distribution, the debug build typically does not work because the
473+
pythonxx_d.lib/.dll are not provided. You can tweak linking of the debug build to the release
474+
Python version, but this typically requires patching pyconfig.h and removing Py_DEBUG and linker pragmas
475+
(google for it!).
476+
462477
\subsection Linux
463478
464479
On Linux, you need to install a Python-dev package.

0 commit comments

Comments
 (0)