diff options
author | Liang Qi <liang.qi@qt.io> | 2018-12-11 16:13:57 +0100 |
---|---|---|
committer | Kai Koehne <kai.koehne@qt.io> | 2018-12-13 10:37:36 +0100 |
commit | f62feef6e6f62244974b58d0d503fbdfa78a68e1 (patch) | |
tree | fdd72c6a82db97164b0ab848f9255e4d02899632 /examples | |
parent | 21112a89e3d742451d6b449fc7075d51266fe709 (diff) | |
parent | 851e74766a96241e3e0e64a945818125b58e72dc (diff) |
Merge remote-tracking branch 'origin/5.11' into 5.12
Conflicts:
.qmake.conf
examples/webenginewidgets/minimal/doc/src/minimal.qdoc
Change-Id: I7475770b8a18a69a33601cf88842a7873ba6003c
Diffstat (limited to 'examples')
-rw-r--r-- | examples/webenginewidgets/minimal/doc/src/minimal.qdoc | 14 |
1 files changed, 10 insertions, 4 deletions
diff --git a/examples/webenginewidgets/minimal/doc/src/minimal.qdoc b/examples/webenginewidgets/minimal/doc/src/minimal.qdoc index 477ff521b..d0b25c4b8 100644 --- a/examples/webenginewidgets/minimal/doc/src/minimal.qdoc +++ b/examples/webenginewidgets/minimal/doc/src/minimal.qdoc @@ -42,6 +42,15 @@ \section1 The Code + We first define a \c commandLineUrlArgument function that returns the URL to open. + This is either the first positional argument given on the command line, or + \c https://www.qt.io as a fallback. + + \quotefromfile webenginewidgets/minimal/main.cpp + \skipto #include + + \printto int main + In the \c main function we first set the \l{QCoreApplication::organizationName} property. This affects the locations where Qt WebEngine stores persistent and cached data (see also @@ -52,14 +61,11 @@ view automatically scale on high-dpi displays. Next, we instantiate a QApplication and a QWebEngineView. The URL - to load is taken from the command-line in \c commandLineUrlArgument and + to load is taken from \c commandLineUrlArgument and loaded by calling \l QWebEngineView::setUrl. The view widget is given a reasonable default size, and shown. Finally, QApplication::exec() launches the main event loop. - \quotefromfile webenginewidgets/minimal/main.cpp - \skipto #include - \printuntil } \section1 Requirements |