diff options
author | Venugopal Shivashankar <Venugopal.Shivashankar@qt.io> | 2018-05-28 17:07:03 +0200 |
---|---|---|
committer | Venugopal Shivashankar <Venugopal.Shivashankar@qt.io> | 2018-06-01 20:04:04 +0000 |
commit | 3b57289e6d8040bbb6747494bcc754bcd8751dfe (patch) | |
tree | b64d93595dd8d5d47f3911b914ad926cdf276e0c /examples/webenginewidgets/tabbedbrowser/main.py | |
parent | 7f798dfc9fc6e3e9756f06f0fedc821e16f1320a (diff) |
Doc: Document the tabbed browser demo
- Added docstrings to the examples sources
to autogenerate the docs for the different parts.
- Updated the conf.py.in to include sphinx.ext.viewcode
to generate html for every source file of the
example.
Change-Id: I668c55070556ca49d12d38c8ec83f09313bffc36
Reviewed-by: Cristian Maureira-Fredes <cristian.maureira-fredes@qt.io>
Reviewed-by: Paul Wicking <paul.wicking@qt.io>
Reviewed-by: Friedemann Kleint <Friedemann.Kleint@qt.io>
Diffstat (limited to 'examples/webenginewidgets/tabbedbrowser/main.py')
-rw-r--r-- | examples/webenginewidgets/tabbedbrowser/main.py | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/examples/webenginewidgets/tabbedbrowser/main.py b/examples/webenginewidgets/tabbedbrowser/main.py index 12efdcd5c..09b6cc9ec 100644 --- a/examples/webenginewidgets/tabbedbrowser/main.py +++ b/examples/webenginewidgets/tabbedbrowser/main.py @@ -60,6 +60,7 @@ from PySide2.QtWebEngineWidgets import (QWebEngineDownloadItem, QWebEnginePage, main_windows = [] def create_main_window(): + """Creates a MainWindow using 75% of the available screen resolution.""" main_win = MainWindow() main_windows.append(main_win) available_geometry = app.desktop().availableGeometry(main_win) @@ -68,11 +69,14 @@ def create_main_window(): return main_win def create_main_window_with_browser(): + """Creates a MainWindow with a tab that loads the www.qt.io webpage.""" main_win = create_main_window() return main_win.add_browser_tab() class MainWindow(QMainWindow): - + """Provides the parent window that includes the BookmarkWidget, + BrowserTabWidget, and a DownloadWidget, to offer the complete + web browsing experience.""" def __init__(self): super(MainWindow, self).__init__() |