aboutsummaryrefslogtreecommitdiffstats
path: root/sources/pyside2/doc
diff options
context:
space:
mode:
authorAlexandru Croitor <alexandru.croitor@qt.io>2018-06-07 11:17:32 +0200
committerAlexandru Croitor <alexandru.croitor@qt.io>2018-06-07 11:17:37 +0200
commit60a3b6a16304af4b1d8896a06b8407fe49f80ed2 (patch)
tree6dca986c5e439c7cb39b17643129dadb436d2fea /sources/pyside2/doc
parent33943b54e9470dc8830e94270e6521524acb2954 (diff)
parent823eea34b77ca16a545a75b55619a5ed4da38c0e (diff)
Merge branch '5.9' into 5.11
Diffstat (limited to 'sources/pyside2/doc')
-rw-r--r--sources/pyside2/doc/conf.py.in6
-rw-r--r--sources/pyside2/doc/gettingstarted.rst2
-rw-r--r--sources/pyside2/doc/index.rst4
-rw-r--r--sources/pyside2/doc/qtmodules/pyside-qtwebenginecore.qdocconf.in3
-rw-r--r--sources/pyside2/doc/qtmodules/pyside-qtwebenginewidgets.qdocconf.in3
-rw-r--r--sources/pyside2/doc/tutorials/examples/images/tabbedbrowser.pngbin0 -> 51262 bytes
-rw-r--r--sources/pyside2/doc/tutorials/examples/tabbedbrowser.rst57
-rw-r--r--sources/pyside2/doc/tutorials/index.rst21
8 files changed, 90 insertions, 6 deletions
diff --git a/sources/pyside2/doc/conf.py.in b/sources/pyside2/doc/conf.py.in
index 26d99c7ed..2eb4e6bf3 100644
--- a/sources/pyside2/doc/conf.py.in
+++ b/sources/pyside2/doc/conf.py.in
@@ -18,6 +18,7 @@ import sys, os
# documentation root, use os.path.abspath to make it absolute, like shown here.
sys.path.append('@CMAKE_CURRENT_SOURCE_DIR@')
sys.path.append('@pyside_BINARY_DIR@')
+sys.path.append('@CMAKE_CURRENT_SOURCE_DIR@/../../../examples/webenginewidgets/tabbedbrowser')
# -- General configuration -----------------------------------------------------
@@ -26,7 +27,8 @@ sys.path.append('@pyside_BINARY_DIR@')
#extensions = ['sphinx.ext.todo', 'sphinx.ext.graphviz', 'inheritance_diagram', 'pysideinclude']
extensions = ['sphinx.ext.autodoc', 'sphinx.ext.doctest', 'sphinx.ext.ifconfig',
'sphinx.ext.coverage', 'sphinx.ext.intersphinx', 'sphinx.ext.todo',
-'sphinx.ext.graphviz', 'inheritance_diagram', 'pysideinclude']
+'sphinx.ext.graphviz', 'inheritance_diagram', 'pysideinclude',
+'sphinx.ext.viewcode']
rst_epilog = """
.. |project| replace:: Qt for Python
@@ -112,7 +114,7 @@ html_theme_path = ['@CMAKE_CURRENT_SOURCE_DIR@/_themes']
# The name for this set of Sphinx documents. If None, it defaults to
# "<project> v<release> documentation".
-html_title = u'PySide2 documentation'
+html_title = u'Qt for Python (Technology Preview)'
# A shorter title for the navigation bar. Default is the same as html_title.
#html_short_title = None
diff --git a/sources/pyside2/doc/gettingstarted.rst b/sources/pyside2/doc/gettingstarted.rst
index 55212b1ba..f24051c18 100644
--- a/sources/pyside2/doc/gettingstarted.rst
+++ b/sources/pyside2/doc/gettingstarted.rst
@@ -12,7 +12,7 @@ With these installed, you are ready to install the |project|
packages using the pip wheel. Run the following command from your command
prompt to install::
- python -m pip install --index-url=http://download.qt.io/snapshots/ci/pyside/5.9/latest pyside2 --trusted-host download.qt.io
+ python -m pip install --index-url=http://download.qt.io/snapshots/ci/pyside/5.11/latest pyside2 --trusted-host download.qt.io
Now that you have |project| installed, you can test your setup by running the following Python
constructs to print version information:
diff --git a/sources/pyside2/doc/index.rst b/sources/pyside2/doc/index.rst
index d505d5759..fa1daec00 100644
--- a/sources/pyside2/doc/index.rst
+++ b/sources/pyside2/doc/index.rst
@@ -61,6 +61,10 @@ Qt Modules
- `Qt AxContainer <PySide2/QtAxContainer/index.html>`_
Provides QAxObject and QAxWidget which act as
containers for COM objects and ActiveX controls.
+ * - `Qt WebEngineCore <PySide2/QtWebEngineCore/index.html>`_
+ Provides the core functionality to integrate web content
+ - `Qt WebEngineWidgets <PySide2/QtWebEngineWidgets/index.html>`_
+ Provides widgets that can handle web content
* - `Qt WebChannel <PySide2/QtWebChannel/index.html>`_
Enables peer-to-peer communication between a server and a client
(HTML/JavaScript or QML application).
diff --git a/sources/pyside2/doc/qtmodules/pyside-qtwebenginecore.qdocconf.in b/sources/pyside2/doc/qtmodules/pyside-qtwebenginecore.qdocconf.in
new file mode 100644
index 000000000..038c803df
--- /dev/null
+++ b/sources/pyside2/doc/qtmodules/pyside-qtwebenginecore.qdocconf.in
@@ -0,0 +1,3 @@
+include(@QT_SRC_DIR@/../qtwebengine/src/webengine/doc/qtwebengine.qdocconf)
+includepaths += -I @QT_SRC_DIR@/../qtwebengine/src/webengine/doc
+include(../pyside-config.qdocconf)
diff --git a/sources/pyside2/doc/qtmodules/pyside-qtwebenginewidgets.qdocconf.in b/sources/pyside2/doc/qtmodules/pyside-qtwebenginewidgets.qdocconf.in
new file mode 100644
index 000000000..038c803df
--- /dev/null
+++ b/sources/pyside2/doc/qtmodules/pyside-qtwebenginewidgets.qdocconf.in
@@ -0,0 +1,3 @@
+include(@QT_SRC_DIR@/../qtwebengine/src/webengine/doc/qtwebengine.qdocconf)
+includepaths += -I @QT_SRC_DIR@/../qtwebengine/src/webengine/doc
+include(../pyside-config.qdocconf)
diff --git a/sources/pyside2/doc/tutorials/examples/images/tabbedbrowser.png b/sources/pyside2/doc/tutorials/examples/images/tabbedbrowser.png
new file mode 100644
index 000000000..655d6b57f
--- /dev/null
+++ b/sources/pyside2/doc/tutorials/examples/images/tabbedbrowser.png
Binary files differ
diff --git a/sources/pyside2/doc/tutorials/examples/tabbedbrowser.rst b/sources/pyside2/doc/tutorials/examples/tabbedbrowser.rst
new file mode 100644
index 000000000..8a2e03110
--- /dev/null
+++ b/sources/pyside2/doc/tutorials/examples/tabbedbrowser.rst
@@ -0,0 +1,57 @@
+**********************
+Web Browser Example
+**********************
+
+The example demonstrates the power and simplicity offered by |project| to developers.
+It uses several |pymodname| submodules to offer a fluid and modern-looking UI that
+is apt for a web browser. The application offers the following features:
+ * Tab-based browsing experience using QTabWidget.
+ * Download manager using a QProgressBar and QWebEngineDownloadItem.
+ * Bookmark manager using QTreeView.
+
+.. image:: images/tabbedbrowser.png
+
+The application's code is organized in several parts for ease of maintenance. For example,
+:code:`DownloadWidget` provides a widget to track progress of a download item. In the following
+sections, these different parts are discussed briefly to help you understand the Python code behind
+them a little better.
+
+BookmarkWidget or :code:`bookmarkwidget.py`
+===========================================
+
+This is a widget that docks to the left of the main window by default. It inherits QTreeView and
+loads a default set of bookmarks using a QStandardItemModel. The model is populated at startup
+for a JSON file, which is updated when you add or remove bookmarks from the tree view.
+
+.. automodule:: bookmarkwidget
+ :members:
+
+DownloadWidget or :code:`downloadwidget.py`
+=============================================
+
+This is a widget that tracks progress of the download item. It inherits QProgressBar to display
+progress of the QWebEngineDownloadItem instance, and offers a context-menu with actions such as Launch,
+Show in folder, Cancel, and Remove.
+
+.. automodule:: downloadwidget
+ :members:
+
+BrowserTabWidget or :code:`browsertabwidget.py`
+===============================================
+
+This is a widget that includes a QWebEngineView to enable viewing web pages. It docks to the right
+of BookmarkWidget in the main window.
+
+.. automodule:: browsertabwidget
+ :members:
+
+MainWindow or :code:`main.py`
+=============================
+
+This is the parent window that collates all the other widgets together to offer the complete package.
+
+.. automodule:: main
+ :members:
+
+
+Try running the example to explore it further.
diff --git a/sources/pyside2/doc/tutorials/index.rst b/sources/pyside2/doc/tutorials/index.rst
index 2e97612aa..18bac57fd 100644
--- a/sources/pyside2/doc/tutorials/index.rst
+++ b/sources/pyside2/doc/tutorials/index.rst
@@ -1,7 +1,22 @@
-PySide tutorials
-****************
+PySide examples and tutorials
+*****************************
-A collection of tutorials and "walkthrough" guides are provided with PySide to help new users get started with PySide development. These documents were ported from C++ to Python and cover a range of topics, from basic use of widgets to step-by-step tutorials that show how an application is put together.
+A collection of examples and tutorials with "walkthrough" guides are
+provided with |project| to help new users get started. These
+documents were ported from C++ to Python and cover a range of topics,
+from basic use of widgets to step-by-step tutorials that show how an
+application is put together.
+
+Examples and demos
+===================
+
+.. toctree::
+ :maxdepth: 1
+
+ examples/tabbedbrowser.rst
+
+Tutorials
+==========
.. toctree::
:maxdepth: 2