Skip to content

Commit 3f8a1d1

Browse files
committed
Add a hint about QByteArray/bytes conversion, use fake footnote references.
1 parent 0e6a9b1 commit 3f8a1d1

File tree

1 file changed

+10
-7
lines changed

1 file changed

+10
-7
lines changed

src/PythonQtDoc.h

Lines changed: 10 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -197,27 +197,30 @@ Qt framework</a>.
197197
<tr><td>long</td><td>integer</td></tr>
198198
<tr><td>ulong,longlong,ulonglong</td><td>long</td></tr>
199199
<tr><td>QString</td><td>unicode string</td></tr>
200-
<tr><td>QByteArray</td><td>QByteArray wrapper</td></tr>
200+
<tr><td>QByteArray</td><td>QByteArray wrapper <sup>\ref qbytearray-bytes "(1)"</sup></td></tr>
201201
<tr><td>char*</td><td>str</td></tr>
202202
<tr><td>QStringList</td><td>tuple of unicode strings</td></tr>
203203
<tr><td>QVariantList</td><td>tuple of objects</td></tr>
204204
<tr><td>QVariantMap</td><td>dict of objects</td></tr>
205-
<tr><td>QVariant</td><td>depends on type, see below</td></tr>
205+
<tr><td>QVariant</td><td>depends on type <sup>\ref qvariant "(2)"</sup></td></tr>
206206
<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>
207207
<tr><td>OwnRegisteredMetaType</td><td>C++ wrapper, optionally with additional information/wrapping provided by registerCPPClass()</td></tr>
208208
<tr><td>QList<AnyObject*></td><td>converts to a list of CPP wrappers</td></tr>
209209
<tr><td>QVector<AnyObject*></td><td>converts to a list of CPP wrappers</td></tr>
210210
<tr><td>EnumType</td><td>Enum wrapper derived from python integer</td></tr>
211211
<tr><td>QObject (and derived classes)</td><td>QObject wrapper</td></tr>
212212
<tr><td>C++ object</td><td>CPP wrapper, either wrapped via PythonQtCppWrapperFactory or just decorated with decorators</td></tr>
213-
<tr><td>PyObject</td><td>PyObject</td></tr>
213+
<tr><td>PyObject</td><td>PyObject <sup>\ref pyobject "(3)"</sup></td></tr>
214214
</table>
215215
216-
PyObject is passed as direct pointer, which allows to pass/return any Python object directly to/from
217-
a Qt slot that uses PyObject* as its argument/return value.
218-
QVariants are mapped recursively as given above, e.g. a dictionary can
216+
-# \anchor qbytearray-bytes The Python 'bytes' type will automatically be converted to QByteArray where required. For converting a QByteArray to 'bytes' use the .data() method.
217+
-# \anchor qvariant QVariants are mapped recursively as given above, e.g. a dictionary can
219218
contain lists of dictionaries of doubles.
220-
All Qt QVariant types are implemented, PythonQt supports the complete Qt API for these object.
219+
-# \anchor pyobject PyObject is passed as direct pointer, which allows to pass/return any Python object directly to/from
220+
a Qt slot that uses PyObject* as its argument/return value.
221+
222+
All Qt QVariant types are implemented, PythonQt supports the complete Qt API for these objects.
223+
221224
222225
\section QObject QObject Wrapping
223226

0 commit comments

Comments
 (0)