summaryrefslogtreecommitdiffstats
path: root/examples/webengine
diff options
context:
space:
mode:
authorAllan Sandfeld Jensen <allan.jensen@qt.io>2019-05-09 15:22:24 +0200
committerAllan Sandfeld Jensen <allan.jensen@qt.io>2019-05-09 15:22:24 +0200
commit0eac492b5c66b1774118c387dd527ad419e51be7 (patch)
tree37324fdefd615e433dd65073390d7b9996d660d3 /examples/webengine
parent5d6086d1b97461b35c143839a8a6ba1b990bb87c (diff)
parent99d46a8a918dee7323bc3d4f1624c47c097f9a3a (diff)
Merge remote-tracking branch 'origin/5.13' into dev
Diffstat (limited to 'examples/webengine')
-rw-r--r--examples/webengine/customdialogs/doc/src/customdialogs.qdoc2
-rw-r--r--examples/webengine/customdialogs/main.cpp1
-rw-r--r--examples/webengine/minimal/doc/src/minimal.qdoc4
-rw-r--r--examples/webengine/quicknanobrowser/BrowserDialog.qml2
-rw-r--r--examples/webengine/quicknanobrowser/DownloadView.qml2
-rw-r--r--examples/webengine/quicknanobrowser/main.cpp5
-rw-r--r--examples/webengine/recipebrowser/doc/src/recipebrowser.qdoc20
7 files changed, 23 insertions, 13 deletions
diff --git a/examples/webengine/customdialogs/doc/src/customdialogs.qdoc b/examples/webengine/customdialogs/doc/src/customdialogs.qdoc
index 3fc888a77..5c550ed5e 100644
--- a/examples/webengine/customdialogs/doc/src/customdialogs.qdoc
+++ b/examples/webengine/customdialogs/doc/src/customdialogs.qdoc
@@ -29,7 +29,7 @@
\example webengine/customdialogs
\title WebEngine Qt Quick Custom Dialogs Example
\ingroup webengine-examples
- \brief Customizes UI elements of Qt WebEngine's dialogs.
+ \brief Customizes UI elements of \QWE's dialogs.
\image customdialogs.png
diff --git a/examples/webengine/customdialogs/main.cpp b/examples/webengine/customdialogs/main.cpp
index 35f39211d..82a3eca63 100644
--- a/examples/webengine/customdialogs/main.cpp
+++ b/examples/webengine/customdialogs/main.cpp
@@ -66,6 +66,7 @@ typedef QGuiApplication Application;
int main(int argc, char *argv[])
{
QCoreApplication::setOrganizationName("QtExamples");
+ QCoreApplication::setAttribute(Qt::AA_EnableHighDpiScaling);
Application app(argc, argv);
QtWebEngine::initialize();
diff --git a/examples/webengine/minimal/doc/src/minimal.qdoc b/examples/webengine/minimal/doc/src/minimal.qdoc
index 8d12afc7c..4fc62bddb 100644
--- a/examples/webengine/minimal/doc/src/minimal.qdoc
+++ b/examples/webengine/minimal/doc/src/minimal.qdoc
@@ -29,7 +29,7 @@
\example webengine/minimal
\title WebEngine Qt Quick Minimal Example
\ingroup webengine-examples
- \brief Displays a web page using the Qt Quick integration of Qt WebEngine.
+ \brief Displays a web page using the Qt Quick integration of \QWE.
\image minimal-example.png
@@ -52,7 +52,7 @@
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
+ where \QWE stores persistent and cached data (see also
\l{WebEngineProfile::cachePath} and
\l{WebEngineProfile::persistentStoragePath}).
diff --git a/examples/webengine/quicknanobrowser/BrowserDialog.qml b/examples/webengine/quicknanobrowser/BrowserDialog.qml
index 6b0b3acd6..a7ff9a55b 100644
--- a/examples/webengine/quicknanobrowser/BrowserDialog.qml
+++ b/examples/webengine/quicknanobrowser/BrowserDialog.qml
@@ -50,7 +50,7 @@
import QtQuick 2.1
import QtQuick.Window 2.2
-import QtWebEngine 1.7
+import QtWebEngine 1.9
Window {
id: window
diff --git a/examples/webengine/quicknanobrowser/DownloadView.qml b/examples/webengine/quicknanobrowser/DownloadView.qml
index ed28c761c..f6ebeab4a 100644
--- a/examples/webengine/quicknanobrowser/DownloadView.qml
+++ b/examples/webengine/quicknanobrowser/DownloadView.qml
@@ -51,7 +51,7 @@
import QtQuick 2.1
import QtQuick.Controls 1.0
import QtQuick.Controls.Styles 1.0
-import QtWebEngine 1.2
+import QtWebEngine 1.9
import QtQuick.Layouts 1.0
Rectangle {
diff --git a/examples/webengine/quicknanobrowser/main.cpp b/examples/webengine/quicknanobrowser/main.cpp
index 18ba7b3e2..8d032f5d8 100644
--- a/examples/webengine/quicknanobrowser/main.cpp
+++ b/examples/webengine/quicknanobrowser/main.cpp
@@ -89,7 +89,10 @@ int main(int argc, char **argv)
Utils utils;
appEngine.rootContext()->setContextProperty("utils", &utils);
appEngine.load(QUrl("qrc:/ApplicationRoot.qml"));
- QMetaObject::invokeMethod(appEngine.rootObjects().first(), "load", Q_ARG(QVariant, startupUrl()));
+ if (!appEngine.rootObjects().isEmpty())
+ QMetaObject::invokeMethod(appEngine.rootObjects().first(), "load", Q_ARG(QVariant, startupUrl()));
+ else
+ qFatal("Failed to load sources");
return app.exec();
}
diff --git a/examples/webengine/recipebrowser/doc/src/recipebrowser.qdoc b/examples/webengine/recipebrowser/doc/src/recipebrowser.qdoc
index 0321c22e4..63a0af361 100644
--- a/examples/webengine/recipebrowser/doc/src/recipebrowser.qdoc
+++ b/examples/webengine/recipebrowser/doc/src/recipebrowser.qdoc
@@ -101,7 +101,7 @@
width.
\skipto WebEngineView
- \printuntil KeyNavigation.priority
+ \printuntil Layout.fillHeight
We then disable the \l{WebEngineSettings::focusOnNavigationEnabled}{focusOnNavigationEnabled}
setting to make sure that the \l{WebEngineView} does not steal focus from the \c RecipeList
@@ -110,19 +110,25 @@
ContextMenuRequest.
\skipto focusOnNavigationEnabled
- \printto firstLoadComplete
+ \printuntil }
When the application starts, instead of directly showing the \l{WebEngineView}, we show a
placeholder \l{Rectangle} with a \l{BusyIndicator} to provide a nicer user experience while the
- application is loading. Once the first page in the view is loaded, we start a \l{Timer} that
+ application is loading.
+
+ \printuntil }
+ \dots 12
+ \skipto Rectangle
+ \printuntil }
+
+ Once the first page in the view is loaded, we start a \l{Timer} that
will hide the placeholder and show the actual page. The delay provides more time for the recipe
images to load, so that when the view is shown, the page is completely rendered. The timer also
shows a help \l{ToolTip} that informs the user on how to navigate the recipes.
- \printuntil busy.running = true
- \printline }
- \printline }
- \printline }
+ \quotefromfile webengine/recipebrowser/resources/qml/main.qml
+ \skipto Timer {
+ \printuntil }
Let's see what the \c RecipeList item looks like from the inside. The root item is a
FocusScope to allow transferring focus to the child ListView whenever the root item receives