aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorFriedemann Kleint <Friedemann.Kleint@qt.io>2021-06-23 08:45:46 +0200
committerFriedemann Kleint <Friedemann.Kleint@qt.io>2021-07-06 15:48:54 +0200
commit57500ee1a277dd36fc650baa1af989a648dec9a7 (patch)
treec5f28a47d433b0924a44bc6464cef0cb56af266b
parenta2bbcb707c01342403458fd6bcaac99e99411185 (diff)
PySide6: Add QtWebEngineQuick
Task-number: PYSIDE-1570 Change-Id: Ic10a8f29439d5171487dfa5954c3b37be116a2b3 Reviewed-by: Christian Tismer <tismer@stackless.com>
-rw-r--r--examples/webenginequick/nanobrowser/quicknanobrowser.py4
-rw-r--r--sources/cmake_helpers/helpers.cmake3
-rw-r--r--sources/pyside6/PySide6/QtWebEngineQuick/CMakeLists.txt29
-rw-r--r--sources/pyside6/PySide6/QtWebEngineQuick/typesystem_webenginequick.xml47
-rw-r--r--sources/pyside6/tests/QtWebEngineQuick/CMakeLists.txt1
5 files changed, 81 insertions, 3 deletions
diff --git a/examples/webenginequick/nanobrowser/quicknanobrowser.py b/examples/webenginequick/nanobrowser/quicknanobrowser.py
index 6e4d04ff3..c6017995a 100644
--- a/examples/webenginequick/nanobrowser/quicknanobrowser.py
+++ b/examples/webenginequick/nanobrowser/quicknanobrowser.py
@@ -44,12 +44,12 @@ import os
from PySide6.QtCore import QUrl
from PySide6.QtQml import QQmlApplicationEngine
from PySide6.QtWidgets import QApplication
-from PySide6.QtWebEngine import QtWebEngine
+from PySide6.QtWebEngineQuick import QtWebEngineQuick
def main():
app = QApplication([])
- QtWebEngine.initialize()
+ QtWebEngineQuick.initialize()
engine = QQmlApplicationEngine()
qml_file_path = os.path.join(os.path.dirname(__file__), 'browser.qml')
qml_url = QUrl.fromLocalFile(os.path.abspath(qml_file_path))
diff --git a/sources/cmake_helpers/helpers.cmake b/sources/cmake_helpers/helpers.cmake
index 0f600d870..7f28e679e 100644
--- a/sources/cmake_helpers/helpers.cmake
+++ b/sources/cmake_helpers/helpers.cmake
@@ -48,7 +48,8 @@ endif()
if(WIN32)
list(APPEND ALL_OPTIONAL_MODULES AxContainer)
endif()
-list(APPEND ALL_OPTIONAL_MODULES WebChannel WebEngineCore WebEngineWidgets WebSockets)
+list(APPEND ALL_OPTIONAL_MODULES WebChannel WebEngineCore WebEngineWidgets
+ WebEngineQuick WebSockets)
if (Qt${QT_MAJOR_VERSION}Core_VERSION VERSION_GREATER 6.0.2)
list(APPEND ALL_OPTIONAL_MODULES 3DCore 3DRender 3DInput 3DLogic 3DAnimation 3DExtras)
endif()
diff --git a/sources/pyside6/PySide6/QtWebEngineQuick/CMakeLists.txt b/sources/pyside6/PySide6/QtWebEngineQuick/CMakeLists.txt
new file mode 100644
index 000000000..80ccd86c4
--- /dev/null
+++ b/sources/pyside6/PySide6/QtWebEngineQuick/CMakeLists.txt
@@ -0,0 +1,29 @@
+project(QtWebEngineQuick)
+
+set(QtWebEngineQuick_SRC
+${QtWebEngineQuick_GEN_DIR}/qtwebenginequick_wrapper.cpp
+# module is always needed
+${QtWebEngineQuick_GEN_DIR}/qtwebenginequick_module_wrapper.cpp
+)
+
+set(QtWebEngineQuick_include_dirs
+ ${QtWebEngineQuick_SOURCE_DIR}
+ ${QtWebEngineQuick_BINARY_DIR}
+ ${Qt${QT_MAJOR_VERSION}Core_INCLUDE_DIRS}
+ ${libpyside_SOURCE_DIR}
+ ${QtCore_GEN_DIR}
+ )
+
+set(QtWebEngineQuick_libraries pyside6
+ ${Qt${QT_MAJOR_VERSION}Core_LIBRARIES}
+ ${Qt${QT_MAJOR_VERSION}WebEngineQuick_LIBRARIES}
+ )
+
+set(QtWebEngineQuick_deps QtCore)
+
+create_pyside_module(NAME QtWebEngineQuick
+ INCLUDE_DIRS QtWebEngineQuick_include_dirs
+ LIBRARIES QtWebEngineQuick_libraries
+ DEPS QtWebEngineQuick_deps
+ TYPESYSTEM_PATH QtWebEngineQuick_SOURCE_DIR
+ SOURCES QtWebEngineQuick_SRC)
diff --git a/sources/pyside6/PySide6/QtWebEngineQuick/typesystem_webenginequick.xml b/sources/pyside6/PySide6/QtWebEngineQuick/typesystem_webenginequick.xml
new file mode 100644
index 000000000..e65db1719
--- /dev/null
+++ b/sources/pyside6/PySide6/QtWebEngineQuick/typesystem_webenginequick.xml
@@ -0,0 +1,47 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!--
+/****************************************************************************
+**
+** Copyright (C) 2021 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="PySide6.QtWebEngineQuick">
+ <load-typesystem name="QtCore/typesystem_core.xml" generate="no"/>
+
+ <namespace-type name="QtWebEngineQuick"/> <!-- initialize() -->
+
+</typesystem>
diff --git a/sources/pyside6/tests/QtWebEngineQuick/CMakeLists.txt b/sources/pyside6/tests/QtWebEngineQuick/CMakeLists.txt
new file mode 100644
index 000000000..2f7cb08b9
--- /dev/null
+++ b/sources/pyside6/tests/QtWebEngineQuick/CMakeLists.txt
@@ -0,0 +1 @@
+# Please add some tests, here