|
86 | 86 | <add-function signature="Q_ARG(PyObject *@type@, PyObject *@value@)"
|
87 | 87 | return-type="QtCoreHelper::QGenericArgumentHolder">
|
88 | 88 | <inject-code file="../glue/qtcore.cpp" snippet="q_arg"/>
|
89 |
| - <inject-documentation format="target" mode="append"> |
90 |
| - This function takes a type (or a type string) and a value of that type |
91 |
| - and returns an internal object that can be passed to |
92 |
| - QMetaObject.invokeMethod(). See also Q_RETURN_ARG(). |
93 |
| - </inject-documentation> |
| 89 | + <inject-documentation format="target" mode="append" |
| 90 | + file="../doc/qtcore.rst" snippet="q_arg"/> |
94 | 91 | </add-function>
|
95 | 92 | <add-function signature="Q_RETURN_ARG(PyObject *@type@)"
|
96 | 93 | return-type="QtCoreHelper::QGenericReturnArgumentHolder">
|
97 | 94 | <inject-code file="../glue/qtcore.cpp" snippet="q_return_arg"/>
|
98 |
| - <inject-documentation format="target" mode="append"> |
99 |
| - This macro takes a type (or a type string) a value of which is then |
100 |
| - returned by QMetaObject::invokeMethod(). See also Q_ARG(). |
101 |
| - </inject-documentation> |
| 95 | + <inject-documentation format="target" mode="append" |
| 96 | + file="../doc/qtcore.rst" snippet="q_return_arg"/> |
102 | 97 | </add-function>
|
103 | 98 |
|
104 | 99 | <!-- TODO: We do not support void* or const void* as arg -->
|
|
1382 | 1377 | <add-function signature="system()" return-type="QLocale" static="yes">
|
1383 | 1378 | <inject-code class="target" position="beginning" file="../glue/qtcore.cpp"
|
1384 | 1379 | snippet="qlocale_system"/>
|
1385 |
| - <inject-documentation mode="append" format="target"> |
1386 |
| - Returns a QLocale object initialized to the system locale. |
1387 |
| - |
1388 |
| - The system locale may use system-specific sources for locale data, where available, |
1389 |
| - otherwise falling back on QLocale's built-in database entry for the language, script and |
1390 |
| - territory the system reports. |
1391 |
| - |
1392 |
| - For example, on Windows, this locale will use the decimal/grouping characters and |
1393 |
| - date/time formats specified in the system configuration panel. |
1394 |
| - |
1395 |
| - .. note:: Qt for Python on macOS will not reflect the user's region and language |
1396 |
| - preferences though QLocale::system(), but will instead reflect the environment |
1397 |
| - variables POSIX uses to specify locale, similar to Python's locale module. If the |
1398 |
| - system locale cannot be determined, which can be due to none of the variables 'LC_ALL', |
1399 |
| - 'LC_CTYPE', 'LANG' or 'LANGUAGE' being set by your environment, then the default POSIX |
1400 |
| - locale or 'C' locale is returned. |
1401 |
| - |
1402 |
| - See also c(). |
1403 |
| - </inject-documentation> |
| 1380 | + <inject-documentation mode="append" format="target" |
| 1381 | + file="../doc/qtcore.rst" snippet="qlocale-system"/> |
1404 | 1382 | </add-function>
|
1405 | 1383 | <modify-function signature="toTime(QString,QLocale::FormatType)const">
|
1406 | 1384 | <modify-argument index="2">
|
|
1676 | 1654 | </modify-function>
|
1677 | 1655 | <add-function signature="createIndex(int@row@,int@column@,PyObject*@ptr@)const" return-type="QModelIndex">
|
1678 | 1656 | <inject-code class="target" position="beginning" file="../glue/qtcore.cpp" snippet="qabstractitemmodel-createindex"/>
|
1679 |
| - <inject-documentation mode="append" format="target"> |
1680 |
| - Creates a model index for the given row and column with the internal pointer ptr. |
1681 |
| - When using a QSortFilterProxyModel, its indexes have their own internal pointer. |
1682 |
| - It is not advisable to access this internal pointer outside of the model. |
1683 |
| - Use the data() function instead. |
1684 |
| - This function provides a consistent interface that model subclasses must use to create model indexes. |
1685 |
| - |
1686 |
| - .. warning:: Because of some Qt/Python itegration rules, the ptr argument do not get the reference |
1687 |
| - incremented during the QModelIndex life time. So it is necessary to keep the object used |
1688 |
| - on ptr argument alive during the whole process. |
1689 |
| - Do not destroy the object if you are not sure about that. |
1690 |
| - </inject-documentation> |
| 1657 | + <inject-documentation mode="append" format="target" |
| 1658 | + file="../doc/qtcore.rst" snippet="qabstractitemmodel-createindex"/> |
1691 | 1659 | </add-function>
|
1692 | 1660 | <inject-code class="target" position="end" file="../glue/qtcore.cpp" snippet="qabstractitemmodel"/>
|
1693 | 1661 | <modify-function signature="mimeData(QList<QModelIndex>)const">
|
|
1864 | 1832 |
|
1865 | 1833 | <add-function signature="findChild(PyTypeObject*@type@,const QString&@name@={},Qt::FindChildOptions@options@=Qt::FindChildrenRecursively)"
|
1866 | 1834 | return-type="PyObject*">
|
1867 |
| - <inject-documentation format="target" mode="append"> |
1868 |
| - To find the child of a certain QObject, the first argument of this function should be the child's type, and the second the name of the child: |
1869 |
| - |
1870 |
| - :: |
1871 |
| - |
1872 |
| - ... |
1873 |
| - parent = QWidget() |
1874 |
| - ... |
1875 |
| - # The first argument must be the child type |
1876 |
| - child1 = parent.findChild(QPushButton, "child_button") |
1877 |
| - child2 = parent.findChild(QWidget, "child_widget") |
1878 |
| - |
1879 |
| - </inject-documentation> |
| 1835 | + <inject-documentation format="target" mode="append" |
| 1836 | + file="../doc/qtcore.rst" snippet="qobject-findChild"/> |
1880 | 1837 | <inject-code class="target" position="beginning" file="../glue/qtcore.cpp" snippet="qobject-findchild-2"/>
|
1881 | 1838 | <modify-argument index="return" pyi-type="Optional[PlaceHolderType]">
|
1882 | 1839 | <parent index="this" action="add"/>
|
|
2696 | 2653 | </extra-includes>
|
2697 | 2654 | <add-function signature="QCoreApplication(QStringList@args@)">
|
2698 | 2655 | <inject-code file="../glue/qtcore.cpp" snippet="qcoreapplication-1"/>
|
2699 |
| - <inject-documentation format="target" mode="append"> |
2700 |
| - Constructs a Qt kernel application. Kernel applications are applications |
2701 |
| - without a graphical user interface. These type of applications are used |
2702 |
| - at the console or as server processes. |
2703 |
| - |
2704 |
| - The *args* argument is processed by the application, and made available |
2705 |
| - in a more convenient form by the :meth:`~PySide6.QtCore.QCoreApplication.arguments()` |
2706 |
| - method. |
2707 |
| - </inject-documentation> |
| 2656 | + <inject-documentation format="target" mode="append" |
| 2657 | + file="../doc/qtcore.rst" snippet="qcoreapplication-init"/> |
2708 | 2658 | </add-function>
|
2709 | 2659 | <add-function signature="QCoreApplication()">
|
2710 | 2660 | <inject-code file="../glue/qtcore.cpp" snippet="qcoreapplication-2"/>
|
|
2792 | 2742 | <modify-function signature="value(QAnyStringView,const QVariant&)const" remove="all"/>
|
2793 | 2743 | <add-function signature="value(const QString&, const QVariant& @defaultValue@ = {}, PyObject* @type@ = nullptr)" return-type="PyObject*">
|
2794 | 2744 | <inject-code class="target" position="beginning" file="../glue/qtcore.cpp" snippet="qsettings-value"/>
|
2795 |
| - <inject-documentation mode="append" format="target"> |
2796 |
| - Custom overload that adds an optional named parameter to the function ``value()`` |
2797 |
| - to automatically cast the type that is being returned by the function. |
2798 |
| - |
2799 |
| - An example of this situation could be an ini file that contains |
2800 |
| - the value of a one-element list:: |
2801 |
| - |
2802 |
| - settings.setValue('var', ['a']) |
2803 |
| - |
2804 |
| - The the ini file will be:: |
2805 |
| - |
2806 |
| - [General] |
2807 |
| - var=a # we cannot know that this is a list! |
2808 |
| - |
2809 |
| - Once we read it, we could specify if we want |
2810 |
| - the default behavior, a str, or to cast the output |
2811 |
| - to a list. |
2812 |
| - |
2813 |
| - settings.value('var') # Will get "a" |
2814 |
| - settings.value('var', type=list) # Will get ["a"] |
2815 |
| - </inject-documentation> |
| 2745 | + <inject-documentation mode="append" format="target" |
| 2746 | + file="../doc/qtcore.rst" snippet="qsettings-value"/> |
2816 | 2747 | </add-function>
|
2817 | 2748 | </object-type>
|
2818 | 2749 | <object-type name="QEvent" polymorphic-id-expression="%1->type() == QEvent::None"
|
|
0 commit comments