diff options
author | Friedemann Kleint <Friedemann.Kleint@qt.io> | 2020-09-24 07:39:50 +0200 |
---|---|---|
committer | Friedemann Kleint <Friedemann.Kleint@qt.io> | 2020-09-24 07:49:07 +0200 |
commit | 9881b68c4c7bc1715cd266c41c63a3a918d83b07 (patch) | |
tree | 5252e3e767e64d98383f6103d9d5941a206a52bc /sources/pyside2 | |
parent | 17a20f95151368a3b92b949b905325865643ca45 (diff) | |
parent | cad869b619fdc0969216e6e9b63fd1afb5edb7db (diff) |
Merge remote-tracking branch 'origin/5.15' into dev
Change-Id: I7e4c7f9378706438715362b1e2da9a3cd2794562
Diffstat (limited to 'sources/pyside2')
6 files changed, 26 insertions, 5 deletions
diff --git a/sources/pyside2/PySide2/QtGui/CMakeLists.txt b/sources/pyside2/PySide2/QtGui/CMakeLists.txt index c6393a1aa..7885af343 100644 --- a/sources/pyside2/PySide2/QtGui/CMakeLists.txt +++ b/sources/pyside2/PySide2/QtGui/CMakeLists.txt @@ -34,6 +34,8 @@ ${QtGui_GEN_DIR}/qclipboard_wrapper.cpp ${QtGui_GEN_DIR}/qcloseevent_wrapper.cpp ${QtGui_GEN_DIR}/qcolor_wrapper.cpp ${QtGui_GEN_DIR}/qcolorspace_wrapper.cpp +${QtGui_GEN_DIR}/qcolorconstants_wrapper.cpp +${QtGui_GEN_DIR}/qcolorconstants_svg_wrapper.cpp ${QtGui_GEN_DIR}/qconicalgradient_wrapper.cpp ${QtGui_GEN_DIR}/qcontextmenuevent_wrapper.cpp ${QtGui_GEN_DIR}/qcursor_wrapper.cpp diff --git a/sources/pyside2/PySide2/QtGui/typesystem_gui_common.xml b/sources/pyside2/PySide2/QtGui/typesystem_gui_common.xml index a096cb0b4..f3456e646 100644 --- a/sources/pyside2/PySide2/QtGui/typesystem_gui_common.xml +++ b/sources/pyside2/PySide2/QtGui/typesystem_gui_common.xml @@ -1001,6 +1001,17 @@ </modify-function> </value-type> + <namespace-type name="QColorConstants" since="5.14"> + <extra-includes> + <include file-name="QColor" location="global"/> + </extra-includes> + <namespace-type name="Svg" since="5.14"> + <extra-includes> + <include file-name="QColor" location="global"/> + </extra-includes> + </namespace-type> + </namespace-type> + <value-type name="QColorSpace" since="5.14"> <enum-type name="NamedColorSpace"/> <enum-type name="Primaries"/> diff --git a/sources/pyside2/PySide2/QtWidgets/typesystem_widgets_common.xml b/sources/pyside2/PySide2/QtWidgets/typesystem_widgets_common.xml index 6347c9394..be53f97de 100644 --- a/sources/pyside2/PySide2/QtWidgets/typesystem_widgets_common.xml +++ b/sources/pyside2/PySide2/QtWidgets/typesystem_widgets_common.xml @@ -1182,7 +1182,8 @@ <object-type name="QLayout"> <inject-code class="native" position="beginning" file="../glue/qtwidgets.cpp" snippet="qlayout-help-functions"/> - + <!-- Becomes a real Q_OPROPERTY in Qt 6 --> + <property name="contentsMargins" type="QMargins" get="contentsMargins" set="setContentsMargins"/> <enum-type name="SizeConstraint"/> <modify-function signature="itemAt(int)const"> @@ -1211,6 +1212,7 @@ <modify-function signature="takeAt(int)"> <modify-argument index="return"> <parent index="this" action="remove"/> + <define-ownership class="native" owner="c++"/> </modify-argument> </modify-function> diff --git a/sources/pyside2/doc/index.rst b/sources/pyside2/doc/index.rst index 72a26d19d..289a653f3 100644 --- a/sources/pyside2/doc/index.rst +++ b/sources/pyside2/doc/index.rst @@ -80,6 +80,10 @@ Documentation </tr> </table> +We have also a `wiki page`_ where you can find how to report bugs, contribute or contact the community. + +.. _`wiki page`: https://wiki.qt.io/Qt_for_Python + .. toctree:: :hidden: :glob: diff --git a/sources/pyside2/doc/tutorials/expenses/main_snake_prop.py b/sources/pyside2/doc/tutorials/expenses/main_snake_prop.py index 4421980c5..f4382e711 100644 --- a/sources/pyside2/doc/tutorials/expenses/main_snake_prop.py +++ b/sources/pyside2/doc/tutorials/expenses/main_snake_prop.py @@ -39,7 +39,7 @@ ############################################################################# import sys -from PySide2.QtCore import Qt, Slot, QSize +from PySide2.QtCore import QMargins, Qt, Slot, QSize from PySide2.QtGui import QPainter from PySide2.QtWidgets import (QAction, QApplication, QHeaderView, QHBoxLayout, QLabel, QLineEdit, QMainWindow, QPushButton, QTableWidget, QTableWidgetItem, @@ -81,7 +81,8 @@ class Widget(QWidget): self.add.enabled = False self.right = QVBoxLayout() - self.right.margin = 10 + + self.right.contents_margins = QMargins(10, 10, 10, 10) self.right.add_widget(QLabel("Description")) self.right.add_widget(self.description) self.right.add_widget(QLabel("Price")) diff --git a/sources/pyside2/tests/QtGui/qcolor_test.py b/sources/pyside2/tests/QtGui/qcolor_test.py index 55554b6c5..22955d86e 100644 --- a/sources/pyside2/tests/QtGui/qcolor_test.py +++ b/sources/pyside2/tests/QtGui/qcolor_test.py @@ -37,7 +37,7 @@ init_test_paths(False) import PySide2 from PySide2.QtCore import Qt -from PySide2.QtGui import QColor +from PySide2.QtGui import QColor, QColorConstants class QColorGetTest(unittest.TestCase): @@ -115,7 +115,8 @@ class QColorCopy(unittest.TestCase): class QColorRepr(unittest.TestCase): def testReprFunction(self): - c = QColor(100, 120, 200) + # QColorConstants are disabled for MSVC/5.15, fixme: Check Qt 6 + c = QColorConstants.Yellow if sys.platform != 'win32' else QColor(100, 120, 200) c2 = eval(c.__repr__()) self.assertEqual(c, c2) |