summaryrefslogtreecommitdiff
path: root/examples/webenginewidgets/stylesheetbrowser/doc/src
diff options
context:
space:
mode:
authorYigit Akcay <yigit.akcay@qt.io>2023-03-23 16:12:06 +0100
committerYigit Akcay <yigit.akcay@qt.io>2023-04-05 14:19:20 +0200
commitfe9d72d931f40eafca97c1012c03e24561c973ff (patch)
tree08e36634557eadae962bb56b82137294a384879c /examples/webenginewidgets/stylesheetbrowser/doc/src
parent88ef502099d535823156c31e77251dd2a723ad1c (diff)
downloadqtwebengine-fe9d72d931f40eafca97c1012c03e24561c973ff.tar.gz
Merge recipe browser, stylesheet browser and markdown editor examples
This patch merges the qtwebengine examples recipe browser, stylesheet browser and markdown editor into one single example. Pick-to: 6.5 Task-number: QTBUG-108751 Change-Id: I338707d7d3275b03bf2a2d7b65064ac91e562d7f Reviewed-by: Michal Klocek <michal.klocek@qt.io>
Diffstat (limited to 'examples/webenginewidgets/stylesheetbrowser/doc/src')
-rw-r--r--examples/webenginewidgets/stylesheetbrowser/doc/src/stylesheetbrowser.qdoc44
1 files changed, 0 insertions, 44 deletions
diff --git a/examples/webenginewidgets/stylesheetbrowser/doc/src/stylesheetbrowser.qdoc b/examples/webenginewidgets/stylesheetbrowser/doc/src/stylesheetbrowser.qdoc
deleted file mode 100644
index 80f333323..000000000
--- a/examples/webenginewidgets/stylesheetbrowser/doc/src/stylesheetbrowser.qdoc
+++ /dev/null
@@ -1,44 +0,0 @@
-// Copyright (C) 2017 The Qt Company Ltd.
-// SPDX-License-Identifier: LicenseRef-Qt-Commercial OR GFDL-1.3-no-invariants-only
-
-/*!
- \example webenginewidgets/stylesheetbrowser
- \title WebEngine StyleSheet Browser Example
- \ingroup webengine-widgetexamples
- \brief Demonstrates how to inject CSS into web pages using user scripts.
-
- \image stylesheetbrowser.png
-
- \e {StyleSheet Browser} demonstrates how to use the \l{Qt WebEngine Widgets C++ Classes}
- {Qt WebEngine C++ classes} to inject user stylesheets into web pages.
-
- \include examples-run.qdocinc
-
- \section1 Working With Stylesheets
-
- We use JavaScript to create and append CSS elements to the documents.
- After declaring the script source, QWebEnginePage::runJavaScript() can run it
- immediately and apply newly created styles on the current content of the web view.
- Encapsulating the script into a QWebEngineScript and adding it to the script collection
- of QWebEnginePage makes its effect permanent.
-
- \quotefromfile webenginewidgets/stylesheetbrowser/mainwindow.cpp
- \skipto MainWindow::insertStyleSheet
- \printuntil /^\}/
-
- Removing stylesheets can be done similarly:
-
- \quotefromfile webenginewidgets/stylesheetbrowser/mainwindow.cpp
- \skipto MainWindow::removeStyleSheet
- \printuntil /^\}/
-
- \section1 Files and Attributions
-
- The example uses icons from the Tango Icon Library:
-
- \table
- \row
- \li \l{stylesheetbrowser-tango}{Tango Icon Library}
- \li Public Domain
- \endtable
-*/