aboutsummaryrefslogtreecommitdiffstats
path: root/sources/pyside6/PySide6/QtQuick
Commit message (Collapse)AuthorAgeFilesLines
* Enable QQuickTextDocument* to be used as a property in QMLFriedemann Kleint2025-10-151-0/+2
| | | | | | | | | | | Add a meta type registration for the pointer type. Complements ad51ac78b6675f8d485b49891d95d2e8876fdab0. Pick-to: 6.10 6.8 Fixes: PYSIDE-3213 Change-Id: I4c3cc374c1721b26f3924821f94b0c4e48a97aa5 Reviewed-by: Cristian Maureira-Fredes <cristian.maureira-fredes@qt.io>
* libshiboken: Split out PEP functions from sbkpython.hFriedemann Kleint2025-09-051-0/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | libshiboken provides replacement functions prefixed "Pep" for functions missing from the limited API or appearing in future Python versions (pep384impl.h, bufferprocs_py37.h, pep384ext.h). This used to be included in the sbkpython.h header, which provides a sanitized Python.h. This patch removes the PEP headers from sbkpython.h header, requiring code using the replacement functions to explicitly include new headers (sbkpep.h, sbkpepbuffer.h). The generator automatically includes sbkpep.h for code snippet compatibility. The aim is to be able to identify code using the replacement functions. It is expected that the usage decreases over time as the Limited API versions are raised and more eplacement functions become obsolete. [ChangeLog][shiboken6] libshiboken's replacement functions providing functions missing from the limited API or appearing in future Python versions have been moved from sbkpython.h (providing a sanitized Python.h) to separate headers sbkpep.h and sbkpepbuffer.h (providing buffer API). This should not affect binding code as the generator includes the new headers, but may require adaption in client code using libshiboken/libpyside directly. Task-number: PYSIDE-3171 Change-Id: I5d79a40ba6755a80c8da99e4ddd6ef93463b4ddf Reviewed-by: Shyamnath Premnadh <Shyamnath.Premnadh@qt.io>
* Remove usage of global header shiboken.hFriedemann Kleint2025-09-021-1/+2
| | | | | | | | | Following the "include only what you need" principle. Pick-to: 6.9 6.8 Task-number: PYSIDE-3171 Change-Id: I6579417f62f9cb0a494d244ed23eb31d924bb79f Reviewed-by: Friedemann Kleint <Friedemann.Kleint@qt.io>
* Silence some shiboken warnings about internal QtQml/QtQuick typesFriedemann Kleint2025-02-191-0/+1
| | | | | | | Pick-to: 6.8 Task-number: PYSIDE-3011 Change-Id: I92fde30427d6fc8572f1d65e267809c1255b0d31 Reviewed-by: Shyamnath Premnadh <Shyamnath.Premnadh@qt.io>
* Add some missing bindingsFriedemann Kleint2024-12-032-2/+4
| | | | | | | Pick-to: 6.8 Task-number: PYSIDE-487 Change-Id: Ia20a9dbfc00e61781fb4be0fa0a205facbb82a1a Reviewed-by: Cristian Maureira-Fredes <cristian.maureira-fredes@qt.io>
* Adapt to 6.8Friedemann Kleint2024-09-051-0/+2
| | | | | | | Task-number: PYSIDE-2620 Task-number: QTBUG-125719 Change-Id: I6efeb1770c9bd7cddc3dbd91ca6294b9fddc9cc9 Reviewed-by: Cristian Maureira-Fredes <cristian.maureira-fredes@qt.io>
* shiboken6: Generate polymorphic bases into type discovery functionsFriedemann Kleint2024-05-061-1/+1
| | | | | | | | | In case of a chain QLabel->QWidget->QObject; QWidget should be marked as a polymorphic base and checked for example for functions returning a QWidget *. Change-Id: I44306d6635794119e6f18658a438e64160c5c41c Reviewed-by: Cristian Maureira-Fredes <cristian.maureira-fredes@qt.io>
* Add some missing classesFriedemann Kleint2024-04-222-0/+21
| | | | | | | | | | | | Identified by the script added by 1251a23cfd13bb0652f38ef3b36087034f552d57. [ChangeLog][PySide6] A number of missing classes have been added. Task-number: PYSIDE-487 Pick-to: 6.7 Change-Id: Ia62aab2578d46f00540856557474bc394669613f Reviewed-by: Adrian Herrmann <adrian.herrmann@qt.io>
* Fix building without QtOpenGLFriedemann Kleint2024-04-093-7/+27
| | | | | | | | | | Introduce a CMake macro to either add the dependency or an entry to the dropped items for typesystem parsing. Pick-to: 6.7 Fixes: PYSIDE-2649 Change-Id: Idb4e6d530075ab8c08c92e2e26d4de1bfd0459cf Reviewed-by: Cristian Maureira-Fredes <cristian.maureira-fredes@qt.io>
* shiboken6: Add attributes for global inline namespacesFriedemann Kleint2024-04-081-1/+2
| | | | | | | Pick-to: 6.7 Fixes: PYSIDE-2590 Change-Id: I36ce25bc759cd888f80b797d4f40864c3d2e2a84 Reviewed-by: Cristian Maureira-Fredes <cristian.maureira-fredes@qt.io>
* Build system: Clean Qt libraries linked by the modulesFriedemann Kleint2024-04-041-5/+0
| | | | | | | | | | | | | | Only the bound Qt library needs to be linked, it will bring its dependencies. Add explanatory comment for the exceptions (QtTest, QtSql). Pick-to: 6.7 Task-number: PYSIDE-2649 Change-Id: Ib84d37248578a76400d307bb5d050005110677c3 Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org> Reviewed-by: Cristian Maureira-Fredes <cristian.maureira-fredes@qt.io> Reviewed-by: Christian Tismer <tismer@stackless.com>
* Adapt to Qt 6.7Friedemann Kleint2024-02-282-1/+15
| | | | | | Task-number: PYSIDE-2497 Change-Id: Id506616710ba06851401cf62511e49967acde71e Reviewed-by: Cristian Maureira-Fredes <cristian.maureira-fredes@qt.io>
* Add QRhi and related classesFriedemann Kleint2023-11-021-0/+2
| | | | | | | | | | | | CMake logic borrowed from the native interface patch. [ChangeLog][PySide6] QRhi and related classes have been added. Pick-to: 6.6 Task-number: QTBUG-113331 Change-Id: I9dd8b0b92f71027fc9f2c170af2993a5b09a4cfd Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org> Reviewed-by: Cristian Maureira-Fredes <cristian.maureira-fredes@qt.io>
* QML registration code: ModernizeFriedemann Kleint2023-10-231-2/+2
| | | | | | | | | | | | | | | Use QQmlPrivate::RegisterTypeAndRevisions and information set as QMetaClassInfo as recommended by QML team. The only remaining old code path is for qmlRegisterSingletonType() for the hypothetical case of a value type. [ChangeLog][PySide6] QML type registration has been ported to use RegisterTypeAndRevisions. Fixes: PYSIDE-2484 Change-Id: I7134cbfe1fad1fb543a560cc13b68327b9bd9c2b Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org> Reviewed-by: Cristian Maureira-Fredes <cristian.maureira-fredes@qt.io>
* Fix Unity build of QtQuickFriedemann Kleint2023-10-181-2/+10
| | | | | | | | | | | | | | qsgrendernode_renderstate_wrapper.cpp and qsgmaterialshader_renderstate_wrapper.cpp have static helper functions named "renderstate_..." that might clash when the order changes due further sources being added. Amends 277783b47e704505f19d00dd80f26239082974d6. Pick-to: 6.6 6.5 Task-number: PYSIDE-2155 Change-Id: I9873f2697b03aa1650847d0daaa622930d74c39d Reviewed-by: Shyamnath Premnadh <Shyamnath.Premnadh@qt.io>
* Add type hints for return values modified to Tuple[]Friedemann Kleint2023-04-131-1/+1
| | | | | | | Pick-to: 6.5 Fixes: PYSIDE-2285 Change-Id: I525ffea2f79bf54de43dc02c31a41994fe3004d5 Reviewed-by: Cristian Maureira-Fredes <cristian.maureira-fredes@qt.io>
* Add license headers to cmake filesFriedemann Kleint2023-02-161-0/+3
| | | | | | | | | | | | CMakeLists.txt and .cmake files of significant size (more than 2 lines according to our check in tst_license.pl) now have the copyright and license header. Task-number: QTBUG-105718 Task-number: QTBUG-88621 Change-Id: I98bd2e80f182d8bf7aef6b633f37a428e2dac69b Reviewed-by: Christian Tismer <tismer@stackless.com> Reviewed-by: Kai Köhne <kai.koehne@qt.io>
* PySide6: Add some ownership modifications for the QSGGeometry exampleFriedemann Kleint2022-12-201-2/+27
| | | | | | | Task-number: PYSIDE-1345 Change-Id: I4baee728a0bb89bb4f698e0ce0b492d219030077 Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org> Reviewed-by: Cristian Maureira-Fredes <cristian.maureira-fredes@qt.io>
* PySide6: Add vertexDataAsPoint2D()/setVertexDataAsPoint2D()Cristian Maureira-Fredes2022-12-201-0/+18
| | | | | | | | | | | | | | vertexDataAsPoint2D returns a pointer (const/non-const for modification) to a series of Point2D within a geometry, but since in Python we don't have access to it, this change replaces that signature for one that returns a list of Point2D elements. For Pythonicity, also add a setter setVertexDataAsPoint2D() to enable modification. Fixes: PYSIDE-1345 Change-Id: I6aba2a097022637c398ad94c17f342f13b4da449 Reviewed-by: Cristian Maureira-Fredes <cristian.maureira-fredes@qt.io>
* PySide6: Remove obsolete "since" tags from typesystemFriedemann Kleint2022-11-021-7/+7
| | | | | | Pick-to: 6.4 6.2 Change-Id: Id7f1c8923eb8612771863893ab159d3434ca5041 Reviewed-by: Cristian Maureira-Fredes <cristian.maureira-fredes@qt.io>
* PyEnum: Define a fixed list of Int(Enum|Flag) decisionsChristian Tismer2022-08-131-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | This was "PyEnum: Write a default Int decisor for Enum and Flag". Historically, C++ enums were all compatible with int. The new Python enums are more diverse here. There are the basic types Enum/IntEnum and Flag/IntFlag. We have tried a lot to come up with a sensible default heuristic computed from the data. In the end, this was reverted and replaced by a fixed list that was collected from similar implementations. By the move away from Int inheritance, a few classes needed extra support. Python 3.11.0b5 also required the Flag creation parameter "boundary=KEEP". It is not clear if this is correct, yet. [ChangeLog][shiboken6] Most former IntEnum/IntFlag are replaced by pure Enum/Flag classes in a generally compatible way to other implementations. Change-Id: I1dbe7b0556a3375df89eb40e9d9f495f14bf42b1 Pick-to: 6.3 Task-number: PYSIDE-1735 Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org> Reviewed-by: Shyamnath Premnadh <Shyamnath.Premnadh@qt.io> Reviewed-by: Friedemann Kleint <Friedemann.Kleint@qt.io>
* Use SPDX license identifiersLucie Gérard2022-05-273-114/+6
| | | | | | | | | | | Replace the current license disclaimer in files by a SPDX-License-Identifier. Files that have to be modified by hand are modified. License files are organized under LICENSES directory. Task-number: QTBUG-67283 Change-Id: I065150015bdb84a3096b5b39c061cf0a20ab637d Reviewed-by: Friedemann Kleint <Friedemann.Kleint@qt.io> Reviewed-by: Cristian Maureira-Fredes <cristian.maureira-fredes@qt.io>
* shiboken6: Write smart pointer constructors/reset methodsFriedemann Kleint2022-04-201-1/+2
| | | | | | | | | | Enable the generation and invalidate the pointee passed in in case it is a wrapped class. Task-number: PYSIDE-454 Change-Id: I4c751d9e8731a6f70e4ecc0f808cb204f010f9b2 Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org> Reviewed-by: Christian Tismer <tismer@stackless.com>
* PySide6: Fix crash when implementing QQuickFramebufferObject.createRenderer()Friedemann Kleint2022-03-231-0/+5
| | | | | | | | | Pass the ownership to C++. Pick-to: 6.2 5.15 Fixes: PYSIDE-1868 Change-Id: I52c0c7778a2d89b38406d6c1e15482855057fb5c Reviewed-by: Cristian Maureira-Fredes <cristian.maureira-fredes@qt.io>
* Simplify special code handling Qt Quick type registrationFriedemann Kleint2022-03-031-111/+21
| | | | | | | | | | | | | | | | | The code used templates to ensure the QMetaTypes registered in QML matched the Qt Quick types (QQuickPaintedItem, QQuickFramebufferObject, QQuickItem). After fixing the metatypes, all that is left is to determine the correct values for QQmlPrivate::RegisterType::parserStatusCast, valueSourceCast and valueInterceptorCast by the template code. This will make the QmlAttached/QmlExtended work with Qt Quick, too. Task-number: PYSIDE-1836 Change-Id: Ic31587c9fd2dca46f6957757079b6abc56cc7416 Reviewed-by: Christian Tismer <tismer@stackless.com> Reviewed-by: Fabian Kosmale <fabian.kosmale@qt.io> Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org>
* PySide6: Fix crash when implementing ↵Friedemann Kleint2022-02-231-1/+7
| | | | | | | | | | | QQuickAsyncImageProvider::requestImageResponse() Release ownership of the returned value. Pick-to: 6.2 Fixes: PYSIDE-1826 Change-Id: I9bae901a239b4f77a37585710270bec20c383f19 Reviewed-by: Christian Tismer <tismer@stackless.com>
* Fix build when Vulkan is not installedFriedemann Kleint2021-12-081-2/+15
| | | | | | | | | | | | | | The Qt headers define some dummy types for Vulkan types that take effect when Vulkan is not installed. This causes QQuickRenderTarget::fromVulkanImage() and some other functions to be declared with no linkage, causing a link error in PySide. Reject the function (which happens in the normal case since VKImage is not known to shiboken). Suppress the warnings in the normal case. Pick-to: 6.2 Fixes: PYSIDE-1726 Change-Id: I915b477280bac5200c8206a7f9044b78c80e2936 Reviewed-by: Cristian Maureira-Fredes <cristian.maureira-fredes@qt.io>
* PySide6: Move the mutex for locking QObject allocation helpers to libpysideFriedemann Kleint2021-12-081-5/+2
| | | | | | | | | | Qml and Quick were using 2 different mutexes, which does not make sense. Task-number: PYSIDE-1709 Change-Id: Id0ec0f780c1d24e40a7f072dea62964ecf92e9d2 Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org> Reviewed-by: Cristian Maureira-Fredes <cristian.maureira-fredes@qt.io>
* Pyside6: Move the QuickRegisterItem helpers into libpysideqmlFriedemann Kleint2021-12-082-2/+3
| | | | | | | | | libpyside had some variables that were only used by Qt Qml/Quick. Move them into libpysideqml. Task-number: PYSIDE-1709 Change-Id: I8d794c1149bc35f5bd0d8c6aec9b222bb7f73bf5 Reviewed-by: Cristian Maureira-Fredes <cristian.maureira-fredes@qt.io>
* Decouple pysidequickregistertype.cpp from the generated wrapper classesFriedemann Kleint2021-11-191-29/+26
| | | | | | | | | | | | | | The registering code determined the size of the generated wrapper class by using sizeof() on them. Replace that by PySide::getSizeOfQObject() as is done in pysideqmlregistertype.cpp. Remove the macro PY_REGISTER_IF_INHERITS_FROM. With that, the code can be moved into a library. Task-number: PYSIDE-1709 Change-Id: Id000a9afec8e94294d92a9d7c6e01fd4d2bf4c37 Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org> Reviewed-by: Cristian Maureira-Fredes <cristian.maureira-fredes@qt.io>
* PySide6: Remove old QtQuick registering codeFriedemann Kleint2021-11-191-53/+0
| | | | | | | Pick-to: 6.2 Task-number: PYSIDE-1709 Change-Id: Iea46ee2c8f4a7d9fd117a3a95adf5e379803a6eb Reviewed-by: Cristian Maureira-Fredes <cristian.maureira-fredes@qt.io>
* PySide6: Remove QML includes from pyside.hFriedemann Kleint2021-11-111-2/+0
| | | | | | | | | | | Forward-declare QQmlPrivate::RegisterType. This requires adding some includes in dependent modules. [ChangeLog][PySide6] pyside.h no longer includes QML headers. Pick-to: 6.2 Change-Id: I7d7b703d46e45adbb714d817f05b5480b35d4a4c Reviewed-by: Cristian Maureira-Fredes <cristian.maureira-fredes@qt.io>
* Define SbkObjectType to be a PyTypeObjectFriedemann Kleint2021-09-111-2/+0
| | | | | | | | | | | | | | | SbkObjectType was a struct embedding a PyTypeObject after fec1611e9f42c1f0a13eb33474df2ed8ee480842. Remove that and make the types equvivalent, which allows for removing many reinterpret_casts. SbkObjectType is left as a typedef for client code snippets. [ChangeLog][shiboken6] SbkObjectType is now a typedef for PyTypeObject. Task-number: PYSIDE-535 Change-Id: I44812311ccbbe0988c38e34c47d16f6874f8d1cf Reviewed-by: Christian Tismer <tismer@stackless.com>
* PySide6: Add missing API of QQuickFramebufferObject.RendererFriedemann Kleint2021-06-282-2/+6
| | | | | | | | | | | The virtuals taking and returning a QOpenGLFramebufferObject were missing since QOpenGLFramebufferObject was moved from Qt Gui to Qt OpenGL. Add the dependency to fix this. Pick-to: 6.1 Fixes: PYSIDE-1611 Change-Id: Idfc234ce79b0619d5c2d8a8901f43733e210eafd Reviewed-by: Christian Tismer <tismer@stackless.com>
* PySide6: Fix some shiboken warningsFriedemann Kleint2021-06-171-1/+0
| | | | | | | | | | | sources/pyside6/PySide6/QtCore/typesystem_core_common.xml:3019: enum 'QJsonDocument::DataValidation' is specified in typesystem, but not declared. sources/pyside6/PySide6/QtCore/typesystem_core_common.xml:2353: signature 'lock()' for function modification in 'QMutex' not found. sources/pyside6/PySide6/QtGui/typesystem_gui_common.xml:504: signature 'operator<<(QPointF)' for function modification in 'QPolygonF' not found. sources/pyside6/PySide6/QtQuick/typesystem_quick.xml:108: enum 'QQuickWindow::NativeObjectType' is specified in typesystem, but not declared. Pick-to: 6.1 Change-Id: I2d36246c2b3df4b7a7a5678dd3eedf73601a85ef Reviewed-by: Cristian Maureira-Fredes <cristian.maureira-fredes@qt.io>
* PySide6: Add missing enumerations and network classesFriedemann Kleint2021-06-091-0/+2
| | | | | | | | | Amends e72dc6d88f85fea451338523058e0407e8c8f0b5. Pick-to: 6.1 Task-number: PYSIDE-1482 Change-Id: I4eea6fc9949ef2307d3b30e18cf2801e8b56d6bb Reviewed-by: Christian Tismer <tismer@stackless.com>
* Add more classes from QtQml/QtQuickFriedemann Kleint2021-06-072-19/+42
| | | | | | | | | | | [ChangeLog][PySide6] A number of missing classes from the qtdeclarative repository have been added. Pick-to: 6.1 Task-number: PYSIDE-1482 Change-Id: Ic6a74cca926338fef5dcf0a5d60a9aa540c6602e Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org> Reviewed-by: Christian Tismer <tismer@stackless.com>
* pysidequickregistertype: Adapt to qmlLists removalMaximilian Goldstein2021-03-232-0/+35
| | | | | | Change-Id: I3028ca6d2183508697452377a70a7197ae0dc3ec Reviewed-by: Fabian Kosmale <fabian.kosmale@qt.io> Reviewed-by: Friedemann Kleint <Friedemann.Kleint@qt.io>
* Fix QQuickItem & co. not working as property typesMaximilian Goldstein2021-02-101-0/+5
| | | | | | | Pick-to: 6.0 Change-Id: I562672534124edb5485bd75f84d8f60130173310 Reviewed-by: Friedemann Kleint <Friedemann.Kleint@qt.io> Reviewed-by: Cristian Maureira-Fredes <cristian.maureira-fredes@qt.io>
* PySide6/QtQml: Fix compilation with new QMetaTypeInterfaceFriedemann Kleint2020-11-271-3/+9
| | | | | | | | | After qtbase/b4c17476129e07dd3bf52c6aac8a51cf30c2dd3a, a function returning the QMetaObject * is required. Task-number: QTBUG-88468 Change-Id: I2d957ff97a2bfa04578873ce098b1e623edf759a Reviewed-by: Fabian Kosmale <fabian.kosmale@qt.io>
* Rename PySide2 to PySide6Friedemann Kleint2020-11-024-0/+514
Adapt CMake files, build scripts, tests and examples. Task-number: PYSIDE-904 Change-Id: I845f7b006e9ad274fed5444ec4c1f9dbe176ff88 Reviewed-by: Christian Tismer <tismer@stackless.com>