aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--examples/declarative/textproperties/main.py3
-rw-r--r--sources/cmake_helpers/helpers.cmake1
-rw-r--r--sources/pyside2/PySide2/QtQuickControls2/CMakeLists.txt41
-rw-r--r--sources/pyside2/PySide2/QtQuickControls2/typesystem_quickcontrols2.xml47
-rw-r--r--sources/pyside2/tests/QtQuickControls2/CMakeLists.txt1
5 files changed, 92 insertions, 1 deletions
diff --git a/examples/declarative/textproperties/main.py b/examples/declarative/textproperties/main.py
index 8da443edc..2f9b987d0 100644
--- a/examples/declarative/textproperties/main.py
+++ b/examples/declarative/textproperties/main.py
@@ -44,6 +44,7 @@ from os.path import abspath, dirname, join
from PySide2.QtCore import QObject, Slot
from PySide2.QtGui import QGuiApplication
from PySide2.QtQml import QQmlApplicationEngine
+from PySide2.QtQuickControls2 import QQuickStyle
class Bridge(QObject):
@@ -90,8 +91,8 @@ class Bridge(QObject):
if __name__ == '__main__':
- sys.argv += ['--style', 'material']
app = QGuiApplication(sys.argv)
+ QQuickStyle.setStyle("Material")
engine = QQmlApplicationEngine()
# Instance of the Python object
diff --git a/sources/cmake_helpers/helpers.cmake b/sources/cmake_helpers/helpers.cmake
index 75dcd9032..fed96b5cd 100644
--- a/sources/cmake_helpers/helpers.cmake
+++ b/sources/cmake_helpers/helpers.cmake
@@ -35,6 +35,7 @@ set(ALL_OPTIONAL_MODULES
Location
Qml
Quick
+ QuickControls2
QuickWidgets
RemoteObjects
Scxml
diff --git a/sources/pyside2/PySide2/QtQuickControls2/CMakeLists.txt b/sources/pyside2/PySide2/QtQuickControls2/CMakeLists.txt
new file mode 100644
index 000000000..8321d8a3e
--- /dev/null
+++ b/sources/pyside2/PySide2/QtQuickControls2/CMakeLists.txt
@@ -0,0 +1,41 @@
+project(QtQuickControls2)
+
+set(QtQuickControls2_SRC
+${QtQuickControls2_GEN_DIR}/qquickstyle_wrapper.cpp
+# module is always needed
+${QtQuickControls2_GEN_DIR}/qtquickcontrols2_module_wrapper.cpp
+)
+
+
+set(QtQuickControls2_include_dirs ${QtQuickControls2_SOURCE_DIR}
+ ${QtQml_SOURCE_DIR}
+ ${Qt${QT_MAJOR_VERSION}Core_INCLUDE_DIRS}
+ ${Qt${QT_MAJOR_VERSION}Gui_INCLUDE_DIRS}
+ ${Qt${QT_MAJOR_VERSION}Network_INCLUDE_DIRS}
+ ${Qt${QT_MAJOR_VERSION}Qml_INCLUDE_DIRS}
+ ${Qt${QT_MAJOR_VERSION}Quick_INCLUDE_DIRS}
+ ${Qt${QT_MAJOR_VERSION}QuickControls2_INCLUDE_DIRS}
+ ${libpyside_SOURCE_DIR}
+ ${QtGui_GEN_DIR}
+ ${QtCore_GEN_DIR}
+ ${QtNetwork_GEN_DIR}
+ ${QtQml_GEN_DIR}
+ ${QtQuick_GEN_DIR}
+ ${QtQuickControls2_GEN_DIR})
+
+set(QtQuickControls2_libraries pyside2
+ ${Qt${QT_MAJOR_VERSION}Core_LIBRARIES}
+ ${Qt${QT_MAJOR_VERSION}Gui_LIBRARIES}
+ ${Qt${QT_MAJOR_VERSION}Network_LIBRARIES}
+ ${Qt${QT_MAJOR_VERSION}Qml_LIBRARIES}
+ ${Qt${QT_MAJOR_VERSION}Quick_LIBRARIES}
+ ${Qt${QT_MAJOR_VERSION}QuickControls2_LIBRARIES})
+
+set(QtQuickControls2_deps QtGui QtNetwork QtQml QtQuick)
+
+create_pyside_module(NAME QtQuickControls2
+ INCLUDE_DIRS QtQuickControls2_include_dirs
+ LIBRARIES QtQuickControls2_libraries
+ DEPS QtQuickControls2_deps
+ TYPESYSTEM_PATH QtQuickControls2_SOURCE_DIR
+ SOURCES QtQuickControls2_SRC)
diff --git a/sources/pyside2/PySide2/QtQuickControls2/typesystem_quickcontrols2.xml b/sources/pyside2/PySide2/QtQuickControls2/typesystem_quickcontrols2.xml
new file mode 100644
index 000000000..51d42b46b
--- /dev/null
+++ b/sources/pyside2/PySide2/QtQuickControls2/typesystem_quickcontrols2.xml
@@ -0,0 +1,47 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!--
+/****************************************************************************
+**
+** Copyright (C) 2020 The Qt Company Ltd.
+** Contact: https://www.qt.io/licensing/
+**
+** This file is part of Qt for Python.
+**
+** $QT_BEGIN_LICENSE:LGPL$
+** Commercial License Usage
+** Licensees holding valid commercial Qt licenses may use this file in
+** accordance with the commercial license agreement provided with the
+** Software or, alternatively, in accordance with the terms contained in
+** a written agreement between you and The Qt Company. For licensing terms
+** and conditions see https://www.qt.io/terms-conditions. For further
+** information use the contact form at https://www.qt.io/contact-us.
+**
+** GNU Lesser General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU Lesser
+** General Public License version 3 as published by the Free Software
+** Foundation and appearing in the file LICENSE.LGPL3 included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU Lesser General Public License version 3 requirements
+** will be met: https://www.gnu.org/licenses/lgpl-3.0.html.
+**
+** GNU General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU
+** General Public License version 2.0 or (at your option) the GNU General
+** Public license version 3 or any later version approved by the KDE Free
+** Qt Foundation. The licenses are as published by the Free Software
+** Foundation and appearing in the file LICENSE.GPL2 and LICENSE.GPL3
+** included in the packaging of this file. Please review the following
+** information to ensure the GNU General Public License requirements will
+** be met: https://www.gnu.org/licenses/gpl-2.0.html and
+** https://www.gnu.org/licenses/gpl-3.0.html.
+**
+** $QT_END_LICENSE$
+**
+****************************************************************************/
+-->
+<typesystem package="PySide2.QtQuickControls2">
+ <load-typesystem name="QtQuick/typesystem_quick.xml" generate="no"/>
+
+ <object-type name="QQuickStyle" since="5.7"/>
+
+</typesystem>
diff --git a/sources/pyside2/tests/QtQuickControls2/CMakeLists.txt b/sources/pyside2/tests/QtQuickControls2/CMakeLists.txt
new file mode 100644
index 000000000..2f7cb08b9
--- /dev/null
+++ b/sources/pyside2/tests/QtQuickControls2/CMakeLists.txt
@@ -0,0 +1 @@
+# Please add some tests, here