diff options
author | Cristian Maureira-Fredes <cristian.maureira-fredes@qt.io> | 2018-04-10 16:43:31 +0200 |
---|---|---|
committer | Cristian Maureira-Fredes <cristian.maureira-fredes@qt.io> | 2018-05-01 21:30:01 +0000 |
commit | 2159f4fdf5e0497c0df96ab200753761e3668700 (patch) | |
tree | 0b79c1e3d2ead7135ff4568d801c97fddc56a538 /sources/pyside2/PySide2 | |
parent | d2fa0f63f08f5cca57be306b9569cb9a76af7cea (diff) |
Avoid set parent for QLabel.pixmap()
Setting owner as default to not allow Python to create a copy
of the QPixmap associated with the QLabel.
The C++ object pointer is acquired through the pixmap() method.
A test case was included.
Task-number: PYSIDE-150
Change-Id: Ie6975c39cbf49a59ebd478db0e1a0c30fc14864a
Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org>
Reviewed-by: Alexandru Croitor <alexandru.croitor@qt.io>
Diffstat (limited to 'sources/pyside2/PySide2')
-rw-r--r-- | sources/pyside2/PySide2/QtWidgets/typesystem_widgets_common.xml | 9 |
1 files changed, 8 insertions, 1 deletions
diff --git a/sources/pyside2/PySide2/QtWidgets/typesystem_widgets_common.xml b/sources/pyside2/PySide2/QtWidgets/typesystem_widgets_common.xml index 488f5081d..27b772064 100644 --- a/sources/pyside2/PySide2/QtWidgets/typesystem_widgets_common.xml +++ b/sources/pyside2/PySide2/QtWidgets/typesystem_widgets_common.xml @@ -2593,7 +2593,14 @@ </modify-argument> </modify-function> - <modify-function signature="setMovie(QMovie*)"> + <modify-function signature="pixmap()const"> + <modify-argument index="return"> + <!-- Defining ownership as "default" avoids the object to be automatically + set as parent of the returned pointer. --> + <define-ownership class="target" owner="default"/> + </modify-argument> + </modify-function> + <modify-function signature="setMovie(QMovie *)"> <modify-argument index="1"> <parent index="this" action="add"/> </modify-argument> |