You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: src/PythonQtDoc.h
+18-21Lines changed: 18 additions & 21 deletions
Original file line number
Diff line number
Diff line change
@@ -53,20 +53,20 @@
53
53
54
54
\section Introduction
55
55
56
-
\b PythonQt is a dynamic <a href="http://www.python.org" target="_blank">
57
-
Python</a> binding for the <a href="http://qt-project.org/" target="_blank">
56
+
\b PythonQt is a dynamic <a href="https://www.python.org" target="_blank">
57
+
Python</a> binding for the <a href="https://www.qt.io" target="_blank">
58
58
Qt framework</a>.
59
59
It offers an easy way to embed the Python scripting language into
60
60
your C++ Qt applications.
61
61
62
62
The focus of PythonQt is on embedding Python into an existing C++ application, not on writing the whole
63
63
application completely in Python.
64
-
64
+
65
65
If you are looking for a simple way to embed Python objects into your C++/Qt Application
66
66
and to script parts of your application via Python, PythonQt is the way to go!
67
67
68
68
PythonQt is a stable library that was developed to make the
69
-
Image Processing and Visualization platform <a href="http://www.mevislab.de" target="_blank">MeVisLab</a>
69
+
Image Processing and Visualization platform <a href="https://www.mevislab.de" target="_blank">MeVisLab</a>
70
70
scriptable from Python.
71
71
72
72
- \ref Features
@@ -77,7 +77,7 @@ Qt framework</a>.
77
77
- \ref Examples
78
78
79
79
\page Features Features
80
-
80
+
81
81
\section Builtin Built-in Features
82
82
83
83
The following are the built-in features of the PythonQt library:
@@ -101,7 +101,7 @@ Qt framework</a>.
101
101
- Extensible handler for Python/C++ conversion of complex types, e.g. mapping of QVector<SomeObject> to/from a Python array
102
102
- Setting of dynamic QObject properties via setProperty(), dynamic properties can be accessed for reading and writing like normal Python attributes (but creating a new property needs to be done with setProperty(), to distinguish from normal Python attributes)
103
103
- Support for QtCore.Signal, QtCore.Slot and QtCore.Property, including the creation of a dynamic QMetaObject.
104
-
104
+
105
105
\section FeaturesQtAll Features with wrapper generator
106
106
107
107
PythonQt offers the additional PythonQt_QtAll library which wraps the complete Qt API, including all C++ classes and all non-slots on QObject derived classes.
@@ -125,15 +125,15 @@ Qt framework</a>.
125
125
- Polymorphic downcasting on QEvent, QGraphicsItem, QStyleOption, ...
126
126
- Multiple inheritance support (e.g., QGraphicsTextItem is a QObject and a QGraphicsItem, PythonQt will handle this well)
127
127
- QtQuick support is experimental and currently it is not possible to register new qml components from Python
128
-
128
+
129
129
\section Supported Supported Versions
130
130
131
131
PythonQt supports:
132
132
- Python 2 (>= Python 2.6)
133
133
- Python 3 (>= Python 3.3)
134
134
- Qt 4.x (Qt 4.7 and Qt 4.8 recommended)
135
135
- Qt 5.x (Tested with Qt 5.0, 5.3, 5.4 and 5.6)
136
-
136
+
137
137
The last working Qt4 version is available at svn branches/Qt4LastWorkingVersion or you can download the PythonQt 3.0 release.
138
138
The current svn trunk no longer supports Qt4, since we started to make use of some Qt5-only features.
139
139
@@ -146,27 +146,24 @@ Qt framework</a>.
146
146
- Ownership handling of objects is not as complete as in PySide and PySide, especially in situations where the ownership is not clearly passed to C++ on the C++ API.
147
147
- QStrings are always converted to unicode Python objects, QByteArray always stays a QByteArray and can be converted using QByteArray.data()
148
148
- Qt methods that take an extra "bool* ok" parameter can be called passing PythonQt.BoolResult as parameter. In PySide, a tuple is returned instead.
149
-
149
+
150
150
\page Download Download
151
151
152
-
PythonQt is hosted on <a href="http://sourceforge.net/projects/pythonqt/" target="_blank">SourceForge</a>.
152
+
PythonQt is hosted on <a href="https://github.com/MeVisLab/pythonqt" target="_blank">GitHub</a>.
153
153
154
-
You can download the source code as a tarball at http://sourceforge.net/projects/pythonqt/files/.
155
-
Alternatively you can get the latest version from the svn repository.
156
-
157
-
You can also browse the source code online via ViewVC: http://pythonqt.svn.sourceforge.net/viewvc/pythonqt/trunk/
154
+
You can download the source code or alternatively you can get the latest version from the git repository.
158
155
159
156
\note We do not offer prebuilt binaries, since there are so many possible combinations of
160
157
platforms (Windows/Linux/MacOs), architectures (32/64 bit) and Qt / Python versions.
161
158
162
159
\page License License
163
-
160
+
164
161
PythonQt is distributed under the LGPL 2.1 license. It can be used in commercial applications when following the LGPL 2.1 obligations.
165
162
166
163
The build system of PythonQt makes use of a modified version of the LGPL'ed QtScript generator,
167
164
located in the "generator" directory.
168
165
169
-
See http://qt.gitorious.org/qt-labs/qtscriptgenerator for details on the original project.
166
+
See https://code.qt.io/cgit/qt-labs/qtscriptgenerator.git for details on the original project.
170
167
Thanks a lot to the QtJambi guys and the QtScript Generator project for the C++ parser and
171
168
Qt typesystem files!
172
169
@@ -424,14 +421,14 @@ yourCpp = None
424
421
it is owned by Python by default. When an object is returned from a C++ API (e.g. a slot), it is owned by C++ by default.
425
422
Since the Qt API contains various APIs that pass the ownership from/to other C++ objects, PythonQt needs to keep track of
426
423
such API calls. This is archieved by annotating arguments and return values in wrapper slots with magic templates:
427
-
424
+
428
425
- PythonQtPassOwnershipToCPP
429
426
- PythonQtPassOwnershipToPython
430
427
- PythonQtNewOwnerOfThis
431
428
432
429
These annotation templates work for since C++ pointer types. In addition to that, they work for QList<AnyObject*>,
433
430
to pass the ownership for each object in the list.
434
-
431
+
435
432
Examples:
436
433
\code
437
434
public slots:
@@ -447,7 +444,7 @@ yourCpp = None
447
444
//! Pass ownership of wrapped object to C++ if parent is != NULL
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).
@@ -456,7 +453,7 @@ the python2x.[lib | dll | so | dynlib].
456
453
The recommended way to build PythonQt is to use the QMake-based *.pro file.
457
454
The build scripts a currently set to use Python 2.6.
458
455
You may need to tweak the \b build/python.prf file to set the correct Python includes and libs on your system.
459
-
456
+
460
457
\subsection Windows
461
458
462
459
On Windows, the (non-source) Python Windows installer can be used.
@@ -500,7 +497,7 @@ the python2x.[lib | dll | so | dynlib].
500
497
pythonxx_d.lib/.dll are not provided. You can tweak linking of the debug build to the release
501
498
Python version, but this typically requires patching pyconfig.h and removing Py_DEBUG and linker pragmas
502
499
(google for it!).
503
-
500
+
504
501
\subsection Linux
505
502
506
503
On Linux, you need to install a Python-dev package.
0 commit comments