diff options
Diffstat (limited to 'sources/pyside6/PySide6')
| -rw-r--r-- | sources/pyside6/PySide6/QtQml/typesystem_qml.xml | 6 | ||||
| -rw-r--r-- | sources/pyside6/PySide6/glue/qtqml.cpp | 5 |
2 files changed, 11 insertions, 0 deletions
diff --git a/sources/pyside6/PySide6/QtQml/typesystem_qml.xml b/sources/pyside6/PySide6/QtQml/typesystem_qml.xml index b5c8840bf..029bdc2c7 100644 --- a/sources/pyside6/PySide6/QtQml/typesystem_qml.xml +++ b/sources/pyside6/PySide6/QtQml/typesystem_qml.xml @@ -58,6 +58,7 @@ <inject-code class="native" position="beginning"> #include <pysideqml.h> #include <pysideqmlregistertype.h> + #include <pysideqmlattached.h> #include "pysideqmlvolatilebool.h" </inject-code> @@ -78,6 +79,11 @@ <value-type name="atomic" generate="no"/> </namespace-type> + <add-function signature="qmlAttachedPropertiesObject(PyTypeObject*,QObject*,bool=true)" + return-type="QObject*"> + <inject-code class="target" file="../glue/qtqml.cpp" snippet="qmlattachedpropertiesobject"/> + </add-function> + <add-function signature="qmlRegisterType(PyTypeObject,const char*,int,int,const char*)" return-type="int"> <inject-code class="target" file="../glue/qtqml.cpp" snippet="qmlregistertype"/> </add-function> diff --git a/sources/pyside6/PySide6/glue/qtqml.cpp b/sources/pyside6/PySide6/glue/qtqml.cpp index 3931e4d51..f9e0e15d4 100644 --- a/sources/pyside6/PySide6/glue/qtqml.cpp +++ b/sources/pyside6/PySide6/glue/qtqml.cpp @@ -42,6 +42,11 @@ const QByteArray message = %CPPSELF.toString().toUtf8(); %PYARG_0 = Shiboken::String::fromCString(message.constData()); // @snippet qmlerrror-repr +// @snippet qmlattachedpropertiesobject +auto *%0 = PySide::Qml::qmlAttachedPropertiesObject(%ARGUMENT_NAMES); +%PYARG_0 = %CONVERTTOPYTHON[QObject*](%0); +// @snippet qmlattachedpropertiesobject + // @snippet qmlregistertype int %0 = PySide::Qml::qmlRegisterType(%ARGUMENT_NAMES); %PYARG_0 = %CONVERTTOPYTHON[int](%0); |
